From 3e6ce744706759435a51bba16124200c14fee332 Mon Sep 17 00:00:00 2001 From: Philip Top Date: Thu, 16 Jul 2026 06:45:56 -0700 Subject: [PATCH 1/3] remove swig interfaces, and C shared library --- CMakeLists.txt | 49 +- config/cmake/addlibSuiteSparse.cmake | 10 +- config/cmake/addlibzmq.cmake | 42 +- docs/installation.md | 7 +- docs/python-nanobind-migration-plan.md | 67 +- interfaces/CMakeLists.txt | 55 - interfaces/griddyn.i | 25 - interfaces/griddyn.py | 370 - interfaces/java/CMakeLists.txt | 86 - interfaces/java/MakeJarCMakeLists.txt.in | 12 - interfaces/java/addLoadLibraryCommand.cmake | 22 - interfaces/java/griddynJava.i | 2 - interfaces/java/installJar.cmake | 1 - .../java/interface/SWIGTYPE_p_double.java | 26 - .../SWIGTYPE_p_f_int_int_double__void.java | 26 - interfaces/java/interface/SWIGTYPE_p_int.java | 26 - .../java/interface/SWIGTYPE_p_p_char.java | 26 - .../java/interface/SWIGTYPE_p_void.java | 26 - interfaces/java/interface/doubleArray.java | 60 - interfaces/java/interface/griddyn.java | 374 - .../java/interface/griddynConstants.java | 14 - interfaces/java/interface/griddynJNI.java | 122 - .../java/interface/griddynJavaJAVA_wrap.c | 2166 ----- .../java/interface/griddyn_status_enum.java | 64 - interfaces/matlab/CMakeLists.txt | 87 - interfaces/matlab/CMakeLists.txt.old | 58 - interfaces/matlab/README.md | 15 - interfaces/matlab/export.txt | 4 - .../matlab/generateMEXcreationScript.cmake | 5 - interfaces/matlab/griddynMatlab.i | 2 - interfaces/matlab/matlabDyn.yaml | 84 - interfaces/matlab/mkgriddynMEXFile.m.in | 1 - .../matlab/target/+griddyn/GRIDDYN_COMPLETE.m | 7 - .../matlab/target/+griddyn/GRIDDYN_PENDING.m | 7 - .../matlab/target/+griddyn/charp_assign.m | 3 - .../matlab/target/+griddyn/charp_value.m | 3 - .../matlab/target/+griddyn/copy_charp.m | 3 - .../matlab/target/+griddyn/copy_doublep.m | 3 - .../matlab/target/+griddyn/delete_charp.m | 3 - .../matlab/target/+griddyn/delete_doublep.m | 3 - .../matlab/target/+griddyn/doubleArray.m | 38 - .../matlab/target/+griddyn/doublep_assign.m | 3 - .../matlab/target/+griddyn/doublep_value.m | 3 - .../target/+griddyn/getSimulationObject.m | 3 - .../target/+griddyn/gridDynEventCreate.m | 3 - .../matlab/target/+griddyn/gridDynEventFree.m | 3 - .../target/+griddyn/gridDynEventSchedule.m | 3 - .../target/+griddyn/gridDynEventSetFlag.m | 3 - .../target/+griddyn/gridDynEventSetString.m | 3 - .../target/+griddyn/gridDynEventSetTarget.m | 3 - .../target/+griddyn/gridDynEventSetValue.m | 3 - .../target/+griddyn/gridDynEventTrigger.m | 3 - .../matlab/target/+griddyn/gridDynObjectAdd.m | 3 - .../+griddyn/gridDynObjectAlgebraicUpdate.m | 3 - .../target/+griddyn/gridDynObjectClone.m | 3 - .../target/+griddyn/gridDynObjectCreate.m | 3 - .../target/+griddyn/gridDynObjectDerivative.m | 3 - .../target/+griddyn/gridDynObjectFind.m | 3 - .../+griddyn/gridDynObjectFindByUserId.m | 3 - .../target/+griddyn/gridDynObjectFree.m | 3 - .../target/+griddyn/gridDynObjectGetFlag.m | 3 - .../target/+griddyn/gridDynObjectGetParent.m | 3 - .../gridDynObjectGetStateVariableTypes.m | 3 - .../target/+griddyn/gridDynObjectGetString.m | 3 - .../+griddyn/gridDynObjectGetSubObject.m | 3 - .../target/+griddyn/gridDynObjectGetType.m | 3 - .../target/+griddyn/gridDynObjectGetValue.m | 3 - .../+griddyn/gridDynObjectGetValueUnits.m | 3 - .../target/+griddyn/gridDynObjectGuessState.m | 3 - .../gridDynObjectIoPartialDerivatives.m | 3 - .../target/+griddyn/gridDynObjectJacobian.m | 3 - .../gridDynObjectOutputPartialDerivatives.m | 3 - .../target/+griddyn/gridDynObjectRemove.m | 3 - .../target/+griddyn/gridDynObjectResidual.m | 3 - .../target/+griddyn/gridDynObjectSetFlag.m | 3 - .../target/+griddyn/gridDynObjectSetState.m | 3 - .../target/+griddyn/gridDynObjectSetString.m | 3 - .../target/+griddyn/gridDynObjectSetValue.m | 3 - .../+griddyn/gridDynObjectSetValueUnits.m | 3 - .../target/+griddyn/gridDynObjectStateSize.m | 3 - .../+griddyn/gridDynSimulationAddCommand.m | 3 - .../gridDynSimulationAlgebraicUpdate.m | 3 - .../+griddyn/gridDynSimulationBusCount.m | 3 - .../target/+griddyn/gridDynSimulationCreate.m | 3 - .../+griddyn/gridDynSimulationDerivative.m | 3 - .../gridDynSimulationDynamicInitialize.m | 3 - .../target/+griddyn/gridDynSimulationFree.m | 3 - .../gridDynSimulationGetCurrentTime.m | 3 - .../+griddyn/gridDynSimulationGetResults.m | 3 - .../+griddyn/gridDynSimulationGetSolverKey.m | 3 - .../gridDynSimulationGetStateVariableTypes.m | 3 - .../+griddyn/gridDynSimulationGetStatus.m | 3 - .../+griddyn/gridDynSimulationGuessState.m | 3 - .../gridDynSimulationInitializeFromArgs.m | 3 - .../gridDynSimulationInitializeFromString.m | 3 - .../+griddyn/gridDynSimulationJacobian.m | 3 - .../+griddyn/gridDynSimulationLineCount.m | 3 - .../+griddyn/gridDynSimulationLoadfile.m | 3 - .../+griddyn/gridDynSimulationPowerflow.m | 3 - .../gridDynSimulationPowerflowInitialize.m | 3 - .../target/+griddyn/gridDynSimulationReset.m | 3 - .../+griddyn/gridDynSimulationResidual.m | 3 - .../target/+griddyn/gridDynSimulationRun.m | 3 - .../+griddyn/gridDynSimulationRunAsync.m | 3 - .../target/+griddyn/gridDynSimulationRunTo.m | 3 - .../+griddyn/gridDynSimulationRunToAsync.m | 3 - .../+griddyn/gridDynSimulationSetState.m | 3 - .../+griddyn/gridDynSimulationStateSize.m | 3 - .../target/+griddyn/gridDynSimulationStep.m | 3 - .../+griddyn/gridDynSimulationStepAsync.m | 3 - .../+griddyn/gridDynSingleQueryCreate.m | 3 - .../target/+griddyn/gridDynSingleQueryFree.m | 3 - .../target/+griddyn/gridDynSingleQueryRun.m | 3 - .../+griddyn/gridDynSingleQueryUpdate.m | 3 - .../target/+griddyn/gridDynSolverKeyFree.m | 3 - .../+griddyn/gridDynVectorQueryAppend.m | 3 - .../+griddyn/gridDynVectorQueryCreate.m | 3 - .../target/+griddyn/gridDynVectorQueryFree.m | 3 - .../target/+griddyn/gridDynVectorQueryRun.m | 3 - .../+griddyn/gridDynVectorQueryUpdate.m | 3 - .../target/+griddyn/griddyn_add_failure.m | 7 - .../+griddyn/griddyn_file_load_failure.m | 7 - .../+griddyn/griddyn_function_failure.m | 7 - .../+griddyn/griddyn_invalid_function_call.m | 7 - .../target/+griddyn/griddyn_invalid_object.m | 7 - .../griddyn_invalid_parameter_value.m | 7 - .../+griddyn/griddyn_object_not_initialized.m | 7 - .../matlab/target/+griddyn/griddyn_ok.m | 7 - .../+griddyn/griddyn_query_load_failure.m | 7 - .../target/+griddyn/griddyn_remove_failure.m | 7 - .../target/+griddyn/griddyn_solve_error.m | 7 - .../+griddyn/griddyn_unknown_parameter.m | 7 - interfaces/matlab/target/+griddyn/new_charp.m | 3 - .../matlab/target/+griddyn/new_doublep.m | 3 - interfaces/matlab/target/SwigGet.m | 3 - interfaces/matlab/target/SwigMem.m | 18 - interfaces/matlab/target/SwigRef.m | 35 - interfaces/matlab/target/griddynMEX.cpp | 7616 --------------- interfaces/octave/CMakeLists.txt | 66 - interfaces/octave/README.md | 11 - .../octave/generateOCTcreationScript.cmake | 5 - interfaces/octave/griddynOCTAVE_wrap.cpp | 8607 ----------------- interfaces/octave/griddynOctave.i | 1 - interfaces/octave/mkgriddynOCTFile.m.in | 1 - interfaces/octave/modifyOctSourceFile.cmake | 26 - interfaces/python/CMakeLists.txt | 76 - interfaces/python/CMakeLists.txt.old | 58 - interfaces/python/__init__.py | 1 - interfaces/python/griddyn.py | 329 - interfaces/python/griddynPython.i | 2 - interfaces/python/griddynPythonPYTHON_wrap.c | 7681 --------------- interfaces/python/setup.py.in | 76 - interfaces/python/setup_old.py.in | 10 - interfaces/setup.py.in | 10 - interfaces/swig_compile.sh | 23 - interfaces/test.py | 4 - interfaces/test/test_basic.m | 117 - interfaces/test/test_basic.py | 106 - pyproject.toml | 1 - src/CMakeLists.txt | 7 - src/griddyn_shared/CMakeLists.txt | 88 - src/griddyn_shared/export.txt | 4 - src/griddyn_shared/griddyn.h | 28 - src/griddyn_shared/griddyn_export.h | 713 -- src/griddyn_shared/griddyn_exportEvents.cpp | 153 - .../griddyn_exportMathFunctions.cpp | 266 - .../griddyn_exportObjectMathFunctions.cpp | 396 - src/griddyn_shared/griddyn_exportObjects.cpp | 466 - src/griddyn_shared/griddyn_exportQueries.cpp | 158 - .../griddyn_exportSimulation.cpp | 443 - src/griddyn_shared/griddyn_export_advanced.h | 150 - .../internal/griddyn_export_internal.h | 103 - test/testSharedLibrary/CMakeLists.txt | 47 - test/testSharedLibrary/basic_tests.cpp | 150 - .../shared_library_tests.cpp | 13 - 175 files changed, 42 insertions(+), 32357 deletions(-) delete mode 100644 interfaces/CMakeLists.txt delete mode 100644 interfaces/griddyn.i delete mode 100644 interfaces/griddyn.py delete mode 100644 interfaces/java/CMakeLists.txt delete mode 100644 interfaces/java/MakeJarCMakeLists.txt.in delete mode 100644 interfaces/java/addLoadLibraryCommand.cmake delete mode 100644 interfaces/java/griddynJava.i delete mode 100644 interfaces/java/installJar.cmake delete mode 100644 interfaces/java/interface/SWIGTYPE_p_double.java delete mode 100644 interfaces/java/interface/SWIGTYPE_p_f_int_int_double__void.java delete mode 100644 interfaces/java/interface/SWIGTYPE_p_int.java delete mode 100644 interfaces/java/interface/SWIGTYPE_p_p_char.java delete mode 100644 interfaces/java/interface/SWIGTYPE_p_void.java delete mode 100644 interfaces/java/interface/doubleArray.java delete mode 100644 interfaces/java/interface/griddyn.java delete mode 100644 interfaces/java/interface/griddynConstants.java delete mode 100644 interfaces/java/interface/griddynJNI.java delete mode 100644 interfaces/java/interface/griddynJavaJAVA_wrap.c delete mode 100644 interfaces/java/interface/griddyn_status_enum.java delete mode 100644 interfaces/matlab/CMakeLists.txt delete mode 100644 interfaces/matlab/CMakeLists.txt.old delete mode 100644 interfaces/matlab/README.md delete mode 100644 interfaces/matlab/export.txt delete mode 100644 interfaces/matlab/generateMEXcreationScript.cmake delete mode 100644 interfaces/matlab/griddynMatlab.i delete mode 100644 interfaces/matlab/matlabDyn.yaml delete mode 100644 interfaces/matlab/mkgriddynMEXFile.m.in delete mode 100644 interfaces/matlab/target/+griddyn/GRIDDYN_COMPLETE.m delete mode 100644 interfaces/matlab/target/+griddyn/GRIDDYN_PENDING.m delete mode 100644 interfaces/matlab/target/+griddyn/charp_assign.m delete mode 100644 interfaces/matlab/target/+griddyn/charp_value.m delete mode 100644 interfaces/matlab/target/+griddyn/copy_charp.m delete mode 100644 interfaces/matlab/target/+griddyn/copy_doublep.m delete mode 100644 interfaces/matlab/target/+griddyn/delete_charp.m delete mode 100644 interfaces/matlab/target/+griddyn/delete_doublep.m delete mode 100644 interfaces/matlab/target/+griddyn/doubleArray.m delete mode 100644 interfaces/matlab/target/+griddyn/doublep_assign.m delete mode 100644 interfaces/matlab/target/+griddyn/doublep_value.m delete mode 100644 interfaces/matlab/target/+griddyn/getSimulationObject.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynEventCreate.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynEventFree.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynEventSchedule.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynEventSetFlag.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynEventSetString.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynEventSetTarget.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynEventSetValue.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynEventTrigger.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectAdd.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectAlgebraicUpdate.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectClone.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectCreate.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectDerivative.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectFind.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectFindByUserId.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectFree.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectGetFlag.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectGetParent.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectGetStateVariableTypes.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectGetString.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectGetSubObject.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectGetType.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectGetValue.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectGetValueUnits.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectGuessState.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectIoPartialDerivatives.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectJacobian.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectOutputPartialDerivatives.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectRemove.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectResidual.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectSetFlag.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectSetState.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectSetString.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectSetValue.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectSetValueUnits.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynObjectStateSize.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationAddCommand.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationAlgebraicUpdate.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationBusCount.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationCreate.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationDerivative.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationDynamicInitialize.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationFree.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationGetCurrentTime.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationGetResults.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationGetSolverKey.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationGetStateVariableTypes.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationGetStatus.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationGuessState.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationInitializeFromArgs.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationInitializeFromString.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationJacobian.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationLineCount.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationLoadfile.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationPowerflow.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationPowerflowInitialize.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationReset.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationResidual.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationRun.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationRunAsync.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationRunTo.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationRunToAsync.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationSetState.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationStateSize.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationStep.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSimulationStepAsync.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSingleQueryCreate.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSingleQueryFree.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSingleQueryRun.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSingleQueryUpdate.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynSolverKeyFree.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynVectorQueryAppend.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynVectorQueryCreate.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynVectorQueryFree.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynVectorQueryRun.m delete mode 100644 interfaces/matlab/target/+griddyn/gridDynVectorQueryUpdate.m delete mode 100644 interfaces/matlab/target/+griddyn/griddyn_add_failure.m delete mode 100644 interfaces/matlab/target/+griddyn/griddyn_file_load_failure.m delete mode 100644 interfaces/matlab/target/+griddyn/griddyn_function_failure.m delete mode 100644 interfaces/matlab/target/+griddyn/griddyn_invalid_function_call.m delete mode 100644 interfaces/matlab/target/+griddyn/griddyn_invalid_object.m delete mode 100644 interfaces/matlab/target/+griddyn/griddyn_invalid_parameter_value.m delete mode 100644 interfaces/matlab/target/+griddyn/griddyn_object_not_initialized.m delete mode 100644 interfaces/matlab/target/+griddyn/griddyn_ok.m delete mode 100644 interfaces/matlab/target/+griddyn/griddyn_query_load_failure.m delete mode 100644 interfaces/matlab/target/+griddyn/griddyn_remove_failure.m delete mode 100644 interfaces/matlab/target/+griddyn/griddyn_solve_error.m delete mode 100644 interfaces/matlab/target/+griddyn/griddyn_unknown_parameter.m delete mode 100644 interfaces/matlab/target/+griddyn/new_charp.m delete mode 100644 interfaces/matlab/target/+griddyn/new_doublep.m delete mode 100644 interfaces/matlab/target/SwigGet.m delete mode 100644 interfaces/matlab/target/SwigMem.m delete mode 100644 interfaces/matlab/target/SwigRef.m delete mode 100644 interfaces/matlab/target/griddynMEX.cpp delete mode 100644 interfaces/octave/CMakeLists.txt delete mode 100644 interfaces/octave/README.md delete mode 100644 interfaces/octave/generateOCTcreationScript.cmake delete mode 100644 interfaces/octave/griddynOCTAVE_wrap.cpp delete mode 100644 interfaces/octave/griddynOctave.i delete mode 100644 interfaces/octave/mkgriddynOCTFile.m.in delete mode 100644 interfaces/octave/modifyOctSourceFile.cmake delete mode 100644 interfaces/python/CMakeLists.txt delete mode 100644 interfaces/python/CMakeLists.txt.old delete mode 100644 interfaces/python/__init__.py delete mode 100644 interfaces/python/griddyn.py delete mode 100644 interfaces/python/griddynPython.i delete mode 100644 interfaces/python/griddynPythonPYTHON_wrap.c delete mode 100644 interfaces/python/setup.py.in delete mode 100644 interfaces/python/setup_old.py.in delete mode 100644 interfaces/setup.py.in delete mode 100755 interfaces/swig_compile.sh delete mode 100644 interfaces/test.py delete mode 100644 interfaces/test/test_basic.m delete mode 100644 interfaces/test/test_basic.py delete mode 100644 src/griddyn_shared/CMakeLists.txt delete mode 100644 src/griddyn_shared/export.txt delete mode 100644 src/griddyn_shared/griddyn.h delete mode 100644 src/griddyn_shared/griddyn_export.h delete mode 100644 src/griddyn_shared/griddyn_exportEvents.cpp delete mode 100644 src/griddyn_shared/griddyn_exportMathFunctions.cpp delete mode 100644 src/griddyn_shared/griddyn_exportObjectMathFunctions.cpp delete mode 100644 src/griddyn_shared/griddyn_exportObjects.cpp delete mode 100644 src/griddyn_shared/griddyn_exportQueries.cpp delete mode 100644 src/griddyn_shared/griddyn_exportSimulation.cpp delete mode 100644 src/griddyn_shared/griddyn_export_advanced.h delete mode 100644 src/griddyn_shared/internal/griddyn_export_internal.h delete mode 100644 test/testSharedLibrary/CMakeLists.txt delete mode 100644 test/testSharedLibrary/basic_tests.cpp delete mode 100644 test/testSharedLibrary/shared_library_tests.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 0140fcd8c..dbcdddd20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -173,16 +173,8 @@ option(GRIDDYN_ENABLE_FMI_EXPORT "Enable construction of a binary fmi shared lib OFF ) -option(GRIDDYN_BUILD_PYTHON_INTERFACE "Build Python extension" OFF) - option(GRIDDYN_BUILD_PYTHON_LIBRARY "Build nanobind Python library" OFF) -option(GRIDDYN_BUILD_MATLAB_INTERFACE "Build Matlab Extension" OFF) - -option(GRIDDYN_BUILD_OCTAVE_INTERFACE "Build Octave extension (very experimental)" OFF) - -option(GRIDDYN_BUILD_JAVA_INTERFACE "Build Java extension" OFF) - option(GRIDDYN_ENABLE_CODE_COVERAGE_TEST "Build a target for testing code coverage" OFF) set(GRIDDYN_ENABLE_OPENMP AUTO CACHE STRING "Enable OpenMP support") @@ -266,37 +258,15 @@ if(NOT DEFINED BUILD_SHARED_LIBS) endif() if(BUILD_SHARED_LIBS) - set(GRIDDYN_BUILD_C_SHARED_LIBRARY ON) set(GRIDDYN_BUILD_CXX_SHARED_LIBRARY ON) set(old_build_shared ON) # we need this to prevent submodules from building shared libs set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) else() - option(GRIDDYN_BUILD_C_SHARED_LIBRARY OFF - "Enable construction of GridDyn binary C based shared library" - ) option(GRIDDYN_BUILD_CXX_SHARED_LIBRARY OFF "Build the GridDyn C++ shared library") endif() -if(GRIDDYN_BUILD_PYTHON_INTERFACE - OR GRIDDYN_BUILD_MATLAB_INTERFACE - OR GRIDDYN_BUILD_JAVA_INTERFACE - OR GRIDDYN_BUILD_OCTAVE_INTERFACE -) - set(INTERFACE_BUILD ON) - hide_variable(BUILD_GRIDDYN_C_SHARED_LIBRARY) - show_variable( - DISABLE_SWIG BOOL "Disable the use of swig to generate interface code and use repo code" - OFF - ) -else() - set(INTERFACE_BUILD OFF) - hide_variable(DISABLE_SWIG) -endif() - -if(INTERFACE_BUILD - OR GRIDDYN_BUILD_CXX_SHARED_LIBRARY - OR GRIDDYN_BUILD_C_SHARED_LIBRARY +if(GRIDDYN_BUILD_CXX_SHARED_LIBRARY OR GRIDDYN_ENABLE_FMI_EXPORT OR GRIDDYN_BUILD_PYTHON_LIBRARY ) @@ -735,9 +705,6 @@ endif(GRIDDYN_ENABLE_CLANG_TOOLS) if(GRIDDYN_BUILD_TESTS AND BUILD_TESTING) # message(STATUS "otcf:${optional_component_test_files}") add_subdirectory(test) - if(GRIDDYN_BUILD_C_SHARED_LIBRARY) - add_subdirectory(test/testSharedLibrary) - endif() enable_testing() # add_test(NAME gridDynTest COMMAND testCore) endif() @@ -783,20 +750,6 @@ if(GRIDDYN_BUILD_TESTS AND BUILD_TESTING) ) set_property(TEST Example179BusDynamicTest PROPERTY LABELS Quick Continuous Nightly) - if(GRIDDYN_BUILD_C_SHARED_LIBRARY) - add_test(NAME testSharedLibrary COMMAND shared_library_tests) - set_property(TEST testSharedLibrary PROPERTY LABELS Nightly Release) - - add_test(NAME testSharedLibraryQuick COMMAND shared_library_tests --run_test=@quick) - set_property(TEST testSharedLibraryQuick PROPERTY LABELS Quick Continuous Valgrind) - endif() -endif() - -# ------------------------------------------------------------ -# swig interface builds -# ------------------------------------------------------------ -if(INTERFACE_BUILD) - add_subdirectory(interfaces) endif() if(GRIDDYN_BUILD_PYTHON_LIBRARY) diff --git a/config/cmake/addlibSuiteSparse.cmake b/config/cmake/addlibSuiteSparse.cmake index b037e70ab..d17e59c66 100644 --- a/config/cmake/addlibSuiteSparse.cmake +++ b/config/cmake/addlibSuiteSparse.cmake @@ -54,11 +54,9 @@ else() set(klu_primary_target klu) endif() -if(${PROJECT_NAME}_BUILD_CXX_SHARED_LIB OR NOT ${PROJECT_NAME}_DISABLE_C_SHARED_LIB) - - if(NOT ${PROJECT_NAME}_USE_SUITESPARSE_STATIC_LIBRARY) - set_target_properties(${klu_primary_target} PROPERTIES PUBLIC_HEADER "") - #[[ if(NOT CMAKE_VERSION VERSION_LESS "3.13") +if(NOT ${PROJECT_NAME}_USE_SUITESPARSE_STATIC_LIBRARY) + set_target_properties(${klu_primary_target} PROPERTIES PUBLIC_HEADER "") + #[[ if(NOT CMAKE_VERSION VERSION_LESS "3.13") install( TARGETS ${klu_primary_target} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} @@ -97,6 +95,4 @@ if(${PROJECT_NAME}_BUILD_CXX_SHARED_LIB OR NOT ${PROJECT_NAME}_DISABLE_C_SHARED_ ) endif() ]] - endif() - endif() diff --git a/config/cmake/addlibzmq.cmake b/config/cmake/addlibzmq.cmake index 4c51a0815..7497cd5aa 100644 --- a/config/cmake/addlibzmq.cmake +++ b/config/cmake/addlibzmq.cmake @@ -117,31 +117,27 @@ else() set(zmq_target_output "libzmq") endif() -if(${PROJECT_NAME}_BUILD_CXX_SHARED_LIB OR NOT ${PROJECT_NAME}_DISABLE_C_SHARED_LIB) - - if(NOT ${PROJECT_NAME}_USE_ZMQ_STATIC_LIBRARY AND NOT ${PROJECT_NAME}_SKIP_ZMQ_INSTALL) - set_target_properties(${zmq_target_output} PROPERTIES PUBLIC_HEADER "") +if(NOT ${PROJECT_NAME}_USE_ZMQ_STATIC_LIBRARY AND NOT ${PROJECT_NAME}_SKIP_ZMQ_INSTALL) + set_target_properties(${zmq_target_output} PROPERTIES PUBLIC_HEADER "") + install( + TARGETS ${zmq_target_output} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + FRAMEWORK DESTINATION "Library/Frameworks" + ) + if(MSVC AND NOT EMBEDDED_DEBUG_INFO AND NOT ${PROJECT_NAME}_BINARY_ONLY_INSTALL) install( - TARGETS ${zmq_target_output} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - FRAMEWORK DESTINATION "Library/Frameworks" + FILES $ + DESTINATION ${CMAKE_INSTALL_BINDIR} + OPTIONAL + COMPONENT libs + ) + endif() + if(MSVC AND NOT ${PROJECT_NAME}_BINARY_ONLY_INSTALL) + install(FILES $ + DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libs ) - if(MSVC AND NOT EMBEDDED_DEBUG_INFO AND NOT ${PROJECT_NAME}_BINARY_ONLY_INSTALL) - install( - FILES $ - DESTINATION ${CMAKE_INSTALL_BINDIR} - OPTIONAL - COMPONENT libs - ) - endif() - if(MSVC AND NOT ${PROJECT_NAME}_BINARY_ONLY_INSTALL) - install(FILES $ - DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libs - ) - endif() - endif() endif() diff --git a/docs/installation.md b/docs/installation.md index 640b1a730..adf376a23 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -48,11 +48,8 @@ GridDyn uses C++11 extensively and will make use of some C++14 features in the n - **ENABLE_TESTS** enable building of the testSuites - **ENABLE_MULTITHREADING** not used at preset but will eventually enable threaded execution in some models - **ENABLE_EXTRA_COMPILER_WARNINGS** enable more compiler warnings (full list in config/cmake/compiler_flags.cmake) -- **BUILD_PYTHON_INTERFACE** enable the python swig interface -- **BUILD_MATLAB_INTERFACE** enable the matlab swig interface -- **BUILD_OCTAVE_INTERFACE** enable the octave swig interface -- **BUILD_JAVA_INTERFACE** enable the java swig interface -- **BUILD_CXX_SHARED_LIB** build `libgriddyn_shared_lib.so`, the c++ interface +- **GRIDDYN_BUILD_PYTHON_LIBRARY** build the nanobind Python package +- **GRIDDYN_BUILD_CXX_SHARED_LIBRARY** build the GridDyn C++ shared library - **ENABLE_CODE_COVERAGE_TEST** enable code coverage tools - **ENABLE_PLUGINS** build libpluginLibrary - **ENABLE_EXTRA_SOLVERS** enable additional solvers (including braid, paradae) diff --git a/docs/python-nanobind-migration-plan.md b/docs/python-nanobind-migration-plan.md index 659bdfaa1..37d7ec68a 100644 --- a/docs/python-nanobind-migration-plan.md +++ b/docs/python-nanobind-migration-plan.md @@ -6,10 +6,10 @@ simulation API. It is intended to stay current as the work progresses. ## Summary -GridDyn currently exposes Python through SWIG wrappers over the C API in -`interfaces/python`. The new direction is to build a Pythonic interface with +GridDyn previously exposed Python through SWIG wrappers over the C API in +`interfaces/python`. The replacement is a Pythonic interface built with nanobind that calls GridDyn C++ directly. The C API and SWIG-generated wrappers -should not be part of the new Python implementation. +are no longer part of the maintained Python implementation. The first milestone is deliberately narrow: expose the simulation object and the minimum surface needed to load, initialize, solve, and run a GridDyn model from @@ -41,8 +41,8 @@ access can follow after the simulation workflow is stable. ## Current State -The existing Python interface is generated from `interfaces/griddyn.i` and -`interfaces/python/griddynPython.i`. It exposes the C API from +The retired Python interface was generated from `interfaces/griddyn.i` and +`interfaces/python/griddynPython.i`. It exposed the C API from `src/griddyn_shared/griddyn_export.h` and `src/griddyn_shared/griddyn_export_advanced.h`. @@ -238,58 +238,26 @@ Use the `rtunits` Python package as the local model: - CMake-driven extension build - package-local compiled extension -Likely CMake options: +Python library CMake option: ```cmake GRIDDYN_BUILD_PYTHON_LIBRARY=ON -GRIDDYN_BUILD_SWIG_INTERFACE=OFF ``` -The current `GRIDDYN_BUILD_PYTHON_INTERFACE` name is ambiguous because it points -to the SWIG interface today. As the new work lands, the CMake option names -should make the distinction clear: - -- `GRIDDYN_BUILD_PYTHON_LIBRARY` for the nanobind package -- `GRIDDYN_BUILD_SWIG_INTERFACES` or similar for the legacy SWIG bindings - The nanobind target should link to internal C++ targets needed by `GriddynRunner` and `GridDynSimulation`, not to `griddyn_shared_lib`. -## SWIG Deprecation And Removal - -There are currently no known users relying on the SWIG bindings. That means -SWIG can likely be removed sooner rather than carried through a long -compatibility period. - -Proposed policy: - -1. Do not add new SWIG typemaps, generated files, or SWIG-based language - interfaces. -2. Add deprecation messaging to the SWIG CMake path once the nanobind - `Simulation` API can load and run a model. -3. Disable SWIG Python builds by default as soon as the nanobind package covers - the basic simulation workflow. -4. Remove SWIG Python sources after a short transition period if no users - appear. -5. Remove Matlab/Octave/Java SWIG paths unless a concrete user need appears. -6. If Matlab support is needed later, prefer a command-line, file-based, or - purpose-built interface rather than reviving SWIG. - -## C API Removal Direction - -The nanobind migration should not depend on the C API. Once the Python package -and any other required workflows no longer need it, the C API can be retired. +## SWIG Removal -Removal should be a separate cleanup phase because the C API currently packages -several useful concepts: +The SWIG-generated language interfaces have been removed. Do not add new SWIG +typemaps, generated files, or SWIG-based language interfaces. If Matlab or +another language needs support later, prefer a command-line, file-based, or +purpose-built interface rather than reviving SWIG. -- opaque object handles -- centralized exception-to-error-code translation -- shared-library export boundaries -- raw-array math and solver access +## C API Removal -Those concepts should either disappear from the public surface or be replaced -by clearer C++/Python mechanisms before the C API is deleted. +The nanobind migration does not depend on the C API. The old C shared-library +target and its export headers have been removed from the maintained build. ## Future API Phases @@ -367,7 +335,7 @@ publish to TestPyPI or PyPI until the Python API is more complete. ## Working Checklist -- [ ] Choose final package location. +- [x] Choose final package location. - [x] Add `pyproject.toml` for scikit-build-core. - [x] Add nanobind CMake discovery and extension target. - [x] Add `griddyn` Python package directory. @@ -378,6 +346,5 @@ publish to TestPyPI or PyPI until the Python API is more complete. - [x] Add CI wheel build and smoke test without package-index publishing. - [ ] Add load and powerflow smoke test. - [ ] Add documentation for the first Python API. -- [ ] Add SWIG deprecation messaging. -- [ ] Disable SWIG Python by default once the nanobind smoke tests pass. -- [ ] Decide whether to remove Matlab/Octave/Java SWIG build paths. +- [x] Remove SWIG interface sources and CMake build paths. +- [x] Remove the C shared-library target. diff --git a/interfaces/CMakeLists.txt b/interfaces/CMakeLists.txt deleted file mode 100644 index 5de170cc9..000000000 --- a/interfaces/CMakeLists.txt +++ /dev/null @@ -1,55 +0,0 @@ -cmake_minimum_required(VERSION 3.5) - -if(NOT DISABLE_SWIG) - find_package(SWIG REQUIRED 3.0) - include(${SWIG_USE_FILE}) -endif() - -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -include_directories("${PROJECT_SOURCE_DIR}/src/griddyn_shared") -include_directories("${CMAKE_INSTALL_PREFIX}/include") -include_directories("${CMAKE_INSTALL_PREFIX}/include/griddyn/griddyn_shared") -link_directories(${CMAKE_INSTALL_PREFIX}/lib) -message("libraries = ${CMAKE_INSTALL_PREFIX}/lib") - -if(WITH_SELFCONTAINED OR (WIN32 AND NOT CYGWIN)) - set(DEF_LIB_PREFIX griddyn) - set(DEF_BIN_PREFIX griddyn) - set(DEF_CMAKE_PREFIX griddyn/cmake) - set(DEF_PYTHON_PREFIX) # Note: Files installed in a griddyn subdirectory - set(DEF_MATLAB_PREFIX griddyn) - set(DEF_INCLUDE_PREFIX griddyn/include) -else() - set(DEF_LIB_PREFIX lib) - set(DEF_BIN_PREFIX bin) - set(DEF_CMAKE_PREFIX lib/cmake/griddyn) - set(DEF_PYTHON_PREFIX python) - set(DEF_MATLAB_PREFIX matlab) - set(DEF_INCLUDE_PREFIX include) -endif() - -# Installation directories are cache entries that can be modified -set(LIB_PREFIX ${DEF_LIB_PREFIX} CACHE PATH "Installation directory for libraries") -set(BIN_PREFIX ${DEF_BIN_PREFIX} CACHE PATH "Installation directory for executables") -set(INCLUDE_PREFIX ${DEF_INCLUDE_PREFIX} CACHE PATH "Installation directory for header files") -set(CMAKE_PREFIX ${DEF_CMAKE_PREFIX} CACHE PATH "Installation directory for CMake files") -set(PYTHON_PREFIX ${DEF_PYTHON_PREFIX} CACHE PATH "Installation directory for Python files") -set(MATLAB_PREFIX ${DEF_MATLAB_PREFIX} CACHE PATH "Installation directory for MATLAB/Octave files") - -set_property(SOURCE griddyn.i PROPERTY CPLUSPLUS ON) -set_property(SOURCE griddyn.i PROPERTY SWIG_MODULE_NAME griddyn) - -if(BUILD_PYTHON_INTERFACE) - add_subdirectory(python) -endif() -if(BUILD_MATLAB_INTERFACE) - add_subdirectory(matlab) -endif() - -if(BUILD_OCTAVE_INTERFACE) - add_subdirectory(octave) -endif() - -if(BUILD_JAVA_INTERFACE) - add_subdirectory(java) -endif() diff --git a/interfaces/griddyn.i b/interfaces/griddyn.i deleted file mode 100644 index 89e30def9..000000000 --- a/interfaces/griddyn.i +++ /dev/null @@ -1,25 +0,0 @@ -#define __attribute__(x) -#define GRIDDYN_Export __attribute__ ((visibility ("default"))) - -%include "typemaps.i" -#pragma SWIG nowarn=451 - -%module griddyn - -%include cpointer.i -%pointer_functions(double, doublep); -%pointer_functions(char, charp); - -%apply (char *STRING, size_t LENGTH) { (const char *value, int N) }; -%cstring_output_maxsize(char *value, int N); -%include carrays.i -%array_class(double, doubleArray); -int gridDynSimulationGetResults(GridDynSimulation sim, const char *datatype, double data[0], int maxSize); - -%{ -#include "griddyn_export.h" -#include "griddyn_export_advanced.h" -%} - -%include "griddyn_export.h" -%include "griddyn_export_advanced.h" diff --git a/interfaces/griddyn.py b/interfaces/griddyn.py deleted file mode 100644 index f128aae5a..000000000 --- a/interfaces/griddyn.py +++ /dev/null @@ -1,370 +0,0 @@ -# This file was automatically generated by SWIG (http://www.swig.org). -# Version 3.0.11 -# -# Do not make changes to this file unless you know what you are doing--modify -# the SWIG interface file instead. - - -from sys import version_info as _swig_python_version_info - -if _swig_python_version_info >= (2, 7, 0): - - def swig_import_helper(): - import importlib - - pkg = __name__.rpartition(".")[0] - mname = ".".join((pkg, "_griddyn")).lstrip(".") - try: - return importlib.import_module(mname) - except ImportError: - return importlib.import_module("_griddyn") - - _griddyn = swig_import_helper() - del swig_import_helper -elif _swig_python_version_info >= (2, 6, 0): - - def swig_import_helper(): - from os.path import dirname - import imp - - fp = None - try: - fp, pathname, description = imp.find_module("_griddyn", [dirname(__file__)]) - except ImportError: - import _griddyn - - return _griddyn - if fp is not None: - try: - _mod = imp.load_module("_griddyn", fp, pathname, description) - finally: - fp.close() - return _mod - - _griddyn = swig_import_helper() - del swig_import_helper -else: - import _griddyn -del _swig_python_version_info -try: - _swig_property = property -except NameError: - pass # Python < 2.2 doesn't have 'property'. - -try: - import builtins as __builtin__ -except ImportError: - import __builtin__ - - -def _swig_setattr_nondynamic(self, class_type, name, value, static=1): - if name == "thisown": - return self.this.own(value) - if name == "this": - if type(value).__name__ == "SwigPyObject": - self.__dict__[name] = value - return - method = class_type.__swig_setmethods__.get(name, None) - if method: - return method(self, value) - if not static: - if _newclass: - object.__setattr__(self, name, value) - else: - self.__dict__[name] = value - else: - raise AttributeError("You cannot add attributes to %s" % self) - - -def _swig_setattr(self, class_type, name, value): - return _swig_setattr_nondynamic(self, class_type, name, value, 0) - - -def _swig_getattr(self, class_type, name): - if name == "thisown": - return self.this.own() - method = class_type.__swig_getmethods__.get(name, None) - if method: - return method(self) - raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name)) - - -def _swig_repr(self): - try: - strthis = "proxy of " + self.this.__repr__() - except __builtin__.Exception: - strthis = "" - return "<%s.%s; %s >" % ( - self.__class__.__module__, - self.__class__.__name__, - strthis, - ) - - -try: - _object = object - _newclass = 1 -except __builtin__.Exception: - - class _object: - pass - - _newclass = 0 - - -def new_doublep(): - return _griddyn.new_doublep() - - -new_doublep = _griddyn.new_doublep - - -def copy_doublep(value): - return _griddyn.copy_doublep(value) - - -copy_doublep = _griddyn.copy_doublep - - -def delete_doublep(obj): - return _griddyn.delete_doublep(obj) - - -delete_doublep = _griddyn.delete_doublep - - -def doublep_assign(obj, value): - return _griddyn.doublep_assign(obj, value) - - -doublep_assign = _griddyn.doublep_assign - - -def doublep_value(obj): - return _griddyn.doublep_value(obj) - - -doublep_value = _griddyn.doublep_value - - -def new_charp(): - return _griddyn.new_charp() - - -new_charp = _griddyn.new_charp - - -def copy_charp(value): - return _griddyn.copy_charp(value) - - -copy_charp = _griddyn.copy_charp - - -def delete_charp(obj): - return _griddyn.delete_charp(obj) - - -delete_charp = _griddyn.delete_charp - - -def charp_assign(obj, value): - return _griddyn.charp_assign(obj, value) - - -charp_assign = _griddyn.charp_assign - - -def charp_value(obj): - return _griddyn.charp_value(obj) - - -charp_value = _griddyn.charp_value - - -class doubleArray(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, doubleArray, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, doubleArray, name) - __repr__ = _swig_repr - - def __init__(self, nelements): - this = _griddyn.new_doubleArray(nelements) - try: - self.this.append(this) - except __builtin__.Exception: - self.this = this - - __swig_destroy__ = _griddyn.delete_doubleArray - __del__ = lambda self: None - - def __getitem__(self, index): - return _griddyn.doubleArray___getitem__(self, index) - - def __setitem__(self, index, value): - return _griddyn.doubleArray___setitem__(self, index, value) - - def cast(self): - return _griddyn.doubleArray_cast(self) - - if _newclass: - frompointer = staticmethod(_griddyn.doubleArray_frompointer) - else: - frompointer = _griddyn.doubleArray_frompointer - - -doubleArray_swigregister = _griddyn.doubleArray_swigregister -doubleArray_swigregister(doubleArray) - - -def doubleArray_frompointer(t): - return _griddyn.doubleArray_frompointer(t) - - -doubleArray_frompointer = _griddyn.doubleArray_frompointer - - -class charArray(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, charArray, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, charArray, name) - __repr__ = _swig_repr - - def __init__(self, nelements): - this = _griddyn.new_charArray(nelements) - try: - self.this.append(this) - except __builtin__.Exception: - self.this = this - - __swig_destroy__ = _griddyn.delete_charArray - __del__ = lambda self: None - - def __getitem__(self, index): - return _griddyn.charArray___getitem__(self, index) - - def __setitem__(self, index, value): - return _griddyn.charArray___setitem__(self, index, value) - - def cast(self): - return _griddyn.charArray_cast(self) - - if _newclass: - frompointer = staticmethod(_griddyn.charArray_frompointer) - else: - frompointer = _griddyn.charArray_frompointer - - -charArray_swigregister = _griddyn.charArray_swigregister -charArray_swigregister(charArray) - - -def charArray_frompointer(t): - return _griddyn.charArray_frompointer(t) - - -charArray_frompointer = _griddyn.charArray_frompointer - -EXECUTION_SUCCESS = _griddyn.EXECUTION_SUCCESS -INVALID_OBJECT = _griddyn.INVALID_OBJECT -INVALID_PARAMETER_VALUE = _griddyn.INVALID_PARAMETER_VALUE -UNKNOWN_PARAMETER = _griddyn.UNKNOWN_PARAMETER -ADD_FAILURE = _griddyn.ADD_FAILURE -REMOVE_FAILURE = _griddyn.REMOVE_FAILURE -QUERY_LOAD_FAILURE = _griddyn.QUERY_LOAD_FAILURE -FILE_LOAD_FAILURE = _griddyn.FILE_LOAD_FAILURE -SOLVE_ERROR = _griddyn.SOLVE_ERROR -OBJECT_NOT_INITIALIZED = _griddyn.OBJECT_NOT_INITIALIZED -INVALID_FUNCTION_CALL = _griddyn.INVALID_FUNCTION_CALL -GRIDDYN_PENDING = _griddyn.GRIDDYN_PENDING -GRIDDYN_COMPLETE = _griddyn.GRIDDYN_COMPLETE - - -gridDynObjectCreate = _griddyn.gridDynObjectCreate -gridDynObjectClone = _griddyn.gridDynObjectClone -gridDynObjectFree = _griddyn.gridDynObjectFree -gridDynObjectAdd = _griddyn.gridDynObjectAdd -gridDynObjectRemove = _griddyn.gridDynObjectRemove -gridDynObjectSetString = _griddyn.gridDynObjectSetString -gridDynObjectSetValue = _griddyn.gridDynObjectSetValue -gridDynObjectSetFlag = _griddyn.gridDynObjectSetFlag -gridDynObjectGetString = _griddyn.gridDynObjectGetString -gridDynObjectGetValue = _griddyn.gridDynObjectGetValue -gridDynObjectGetFlag = _griddyn.gridDynObjectGetFlag -gridDynObjectFind = _griddyn.gridDynObjectFind -gridDynObjectGetSubObject = _griddyn.gridDynObjectGetSubObject -gridDynObjectFindByUserId = _griddyn.gridDynObjectFindByUserId -gridDynObjectGetParent = _griddyn.gridDynObjectGetParent -gridDynObjectGetType = _griddyn.gridDynObjectGetType - - -gridDynSimulationCreate = _griddyn.gridDynSimulationCreate -gridDynSimulationFree = _griddyn.gridDynSimulationFree -gridDynSimulationInitializeFromString = _griddyn.gridDynSimulationInitializeFromString -gridDynSimulationInitializeFromArgs = _griddyn.gridDynSimulationInitializeFromArgs -gridDynSimulationLoadfile = _griddyn.gridDynSimulationLoadfile -gridDynSimulationAddCommand = _griddyn.gridDynSimulationAddCommand -gridDynSimulationPowerflowInitialize = _griddyn.gridDynSimulationPowerflowInitialize -gridDynSimulationPowerflow = _griddyn.gridDynSimulationPowerflow -gridDynSimulationDynamicInitialize = _griddyn.gridDynSimulationDynamicInitialize -gridDynSimulationReset = _griddyn.gridDynSimulationReset -gridDynSimulationGetCurrentTime = _griddyn.gridDynSimulationGetCurrentTime -gridDynSimulationRun = _griddyn.gridDynSimulationRun -gridDynSimulationRunTo = _griddyn.gridDynSimulationRunTo -gridDynSimulationStep = _griddyn.gridDynSimulationStep -gridDynSimulationRunAsync = _griddyn.gridDynSimulationRunAsync -gridDynSimulationRunToAsync = _griddyn.gridDynSimulationRunToAsync -gridDynSimulationStepAsync = _griddyn.gridDynSimulationStepAsync -gridDynSimulationGetStatus = _griddyn.gridDynSimulationGetStatus - - -def getSimulationObject(sim): - return _griddyn.getSimulationObject(sim) - - -getSimulationObject = _griddyn.getSimulationObject - - -gridDynSimulationGetSolverKey = _griddyn.gridDynSimulationGetSolverKey -gridDynSolverKeyFree = _griddyn.gridDynSolverKeyFree -gridDynSimulationStateSize = _griddyn.gridDynSimulationStateSize -gridDynSimulationBusCount = _griddyn.gridDynSimulationBusCount -gridDynSimulationLineCount = _griddyn.gridDynSimulationLineCount -gridDynSimulationGetResults = _griddyn.gridDynSimulationGetResults -gridDynSimulationGuessState = _griddyn.gridDynSimulationGuessState -gridDynSimulationSetState = _griddyn.gridDynSimulationSetState -gridDynSimulationGetStateVariableTypes = _griddyn.gridDynSimulationGetStateVariableTypes -gridDynSimulationResidual = _griddyn.gridDynSimulationResidual -gridDynSimulationDerivative = _griddyn.gridDynSimulationDerivative -gridDynSimulationAlgebraicUpdate = _griddyn.gridDynSimulationAlgebraicUpdate -gridDynSimulationJacobian = _griddyn.gridDynSimulationJacobian -gridDynSingleQueryCreate = _griddyn.gridDynSingleQueryCreate -gridDynVectorQueryCreate = _griddyn.gridDynVectorQueryCreate -gridDynSingleQueryFree = _griddyn.gridDynSingleQueryFree -gridDynVectorQueryFree = _griddyn.gridDynVectorQueryFree -gridDynSingleQueryRun = _griddyn.gridDynSingleQueryRun -gridDynVectorQueryRun = _griddyn.gridDynVectorQueryRun -gridDynVectorQueryAppend = _griddyn.gridDynVectorQueryAppend -gridDynSingleQueryUpdate = _griddyn.gridDynSingleQueryUpdate -gridDynVectorQueryUpdate = _griddyn.gridDynVectorQueryUpdate -gridDynEventCreate = _griddyn.gridDynEventCreate -gridDynEventFree = _griddyn.gridDynEventFree -gridDynEventTrigger = _griddyn.gridDynEventTrigger -gridDynEventSchedule = _griddyn.gridDynEventSchedule -gridDynEventSetValue = _griddyn.gridDynEventSetValue -gridDynEventSetString = _griddyn.gridDynEventSetString -gridDynEventSetFlag = _griddyn.gridDynEventSetFlag -gridDynEventSetTarget = _griddyn.gridDynEventSetTarget -gridDynObjectStateSize = _griddyn.gridDynObjectStateSize -gridDynObjectGuessState = _griddyn.gridDynObjectGuessState -gridDynObjectSetState = _griddyn.gridDynObjectSetState -gridDynObjectGetStateVariableTypes = _griddyn.gridDynObjectGetStateVariableTypes -gridDynObjectResidual = _griddyn.gridDynObjectResidual -gridDynObjectDerivative = _griddyn.gridDynObjectDerivative -gridDynObjectAlgebraicUpdate = _griddyn.gridDynObjectAlgebraicUpdate -gridDynObjectJacobian = _griddyn.gridDynObjectJacobian -gridDynObjectIoPartialDerivatives = _griddyn.gridDynObjectIoPartialDerivatives -gridDynObjectOutputPartialDerivatives = _griddyn.gridDynObjectOutputPartialDerivatives -# This file is compatible with both classic and new-style classes. diff --git a/interfaces/java/CMakeLists.txt b/interfaces/java/CMakeLists.txt deleted file mode 100644 index c2517baf3..000000000 --- a/interfaces/java/CMakeLists.txt +++ /dev/null @@ -1,86 +0,0 @@ -find_package(Java REQUIRED) -find_package(JNI REQUIRED) -include(UseJava) - -include_directories(${JAVA_INCLUDE_PATH}) -include_directories(${JNI_INCLUDE_DIRS}) -if(DISABLE_SWIG OR NOT SWIG_EXECUTABLE) - file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/interface/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) - add_library(JNIgriddyn SHARED interface/griddynJavaJAVA_wrap.c) - target_link_libraries(JNIgriddyn griddynSharedLib ${JAVA_LIBRARIES}) - set_target_properties(JNIgriddyn PROPERTIES FOLDER interfaces) -else(DISABLE_SWIG) - # Enable generation using swig - include(UseSWIG) - set_property(SOURCE griddynJava.i PROPERTY SWIG_MODULE_NAME JNIgriddyn) - - set(CMAKE_SWIG_FLAGS "-package;com.java.griddyn") - if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_GREATER 3.7) - swig_add_library( - JNIgriddyn - TYPE MODULE - LANGUAGE java - SOURCES griddynJava.i - ) - else() - swig_add_module(JNIgriddyn java griddynJava.i) - endif() - - swig_link_libraries(JNIgriddyn griddyn_shared_lib) - swig_link_libraries(JNIgriddyn ${JAVA_LIBRARIES}) - - set_target_properties(JNIgriddyn PROPERTIES FOLDER interfaces) - - if(APPLE) - - # SET_TARGET_PROPERTIES(griddynSharedLib PROPERTIES MACOSX_RPATH TRUE) - # SET_TARGET_PROPERTIES(griddynSharedLib PROPERTIES CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) - - # SET_TARGET_PROPERTIES(_griddyn PROPERTIES MACOSX_RPATH TRUE) - # SET_TARGET_PROPERTIES(_griddyn PROPERTIES CMAKE_INSTALL_RPATH_USE_LINK_PATH - # SET_TARGET_PROPERTIES(griddyn PROPERTIES INSTALL_RPATH "@loader_path/../../..") - - else() - - # SET_TARGET_PROPERTIES(_griddyn PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") - # SET_TARGET_PROPERTIES(_griddyn PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE) - - endif() - -endif() # DISABLE_SWIG - -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/MakeJarCMakeLists.txt.in ${CMAKE_CURRENT_BINARY_DIR}/CMakeLists.txt - @ONLY -) - -file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/buildjar/) - -# -D ADDITIONAL_JAR_FILES=$;$ -add_custom_command( - TARGET "JNIgriddyn" POST_BUILD - COMMAND ${CMAKE_COMMAND} -D LIBRARY_FILE=$ -P - ${CMAKE_CURRENT_SOURCE_DIR}/addLoadLibraryCommand.cmake -) - -add_custom_command( - TARGET "JNIgriddyn" - POST_BUILD - COMMAND ${CMAKE_COMMAND} ARGS .. - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/buildjar" - VERBATIM -) - -add_custom_command( - TARGET "JNIgriddyn" - POST_BUILD - COMMAND ${CMAKE_COMMAND} ARGS --build . --target griddyn - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/buildjar/" - COMMENT "Building jar file" - VERBATIM -) - -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/buildjar/griddyn.jar DESTINATION java COMPONENT java) -install(FILES $ DESTINATION java COMPONENT java) -install(TARGETS JNIgriddyn DESTINATION java COMPONENT java) -install(FILES ${KEY_LIBRARY_FILES} DESTINATION java COMPONENT java) diff --git a/interfaces/java/MakeJarCMakeLists.txt.in b/interfaces/java/MakeJarCMakeLists.txt.in deleted file mode 100644 index 54b44155f..000000000 --- a/interfaces/java/MakeJarCMakeLists.txt.in +++ /dev/null @@ -1,12 +0,0 @@ -cmake_minimum_required (VERSION 3.5) -project (GRIDDYNJAR) - -FIND_PACKAGE(Java REQUIRED) -INCLUDE(UseJava) - -set(CMAKE_INSTALL_PREFIX @CMAKE_CURRENT_BINARY_DIR@) -FILE (GLOB JAVAFILES @CMAKE_CURRENT_BINARY_DIR@/*.java) -add_jar(griddyn - SOURCES ${JAVAFILES} ${ADDITIONAL_JAR_FILES} - OUTPUT_NAME griddyn - VERSION @GRIDDYN_VERSION@) diff --git a/interfaces/java/addLoadLibraryCommand.cmake b/interfaces/java/addLoadLibraryCommand.cmake deleted file mode 100644 index 4ccd9c4de..000000000 --- a/interfaces/java/addLoadLibraryCommand.cmake +++ /dev/null @@ -1,22 +0,0 @@ -# addLoadLibraryCommand.cmake -#adds a load library function to the JNIgriddyn.java - -if(NOT LIBRARY_FILE) - set(LIBRARY_FILE JNIgriddyn) -else() - get_filename_component(LIBRARY_FILE ${LIBRARY_FILE} NAME_WE) - string(REGEX REPLACE "^lib" "" LIBRARY_FILE ${LIBRARY_FILE}) -endif() -file(READ griddynJNI.java GRIDDYN_JNI_SOURCE) -string(FIND "${GRIDDYN_JNI_SOURCE}" "System.loadLibrary" ALREADY_LOADED) -if(${ALREADY_LOADED} LESS 0) - string( - REPLACE - "public class griddynJNI {" - "public class griddynJNI {\n static {\n System.loadLibrary\(\"${LIBRARY_FILE}\"\);\n }" - GRIDDYN_JNI_SOURCE - "${GRIDDYN_JNI_SOURCE}" - ) - - file(WRITE griddynJNI.java "${GRIDDYN_JNI_SOURCE}") -endif() diff --git a/interfaces/java/griddynJava.i b/interfaces/java/griddynJava.i deleted file mode 100644 index f21ee3363..000000000 --- a/interfaces/java/griddynJava.i +++ /dev/null @@ -1,2 +0,0 @@ -%include "various.i" -%include "../griddyn.i" diff --git a/interfaces/java/installJar.cmake b/interfaces/java/installJar.cmake deleted file mode 100644 index b70b765e7..000000000 --- a/interfaces/java/installJar.cmake +++ /dev/null @@ -1 +0,0 @@ -# Placeholder for Java JAR installation logic. diff --git a/interfaces/java/interface/SWIGTYPE_p_double.java b/interfaces/java/interface/SWIGTYPE_p_double.java deleted file mode 100644 index 398db8682..000000000 --- a/interfaces/java/interface/SWIGTYPE_p_double.java +++ /dev/null @@ -1,26 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.12 - * - * Do not make changes to this file unless you know what you are doing--modify - * the SWIG interface file instead. - * ----------------------------------------------------------------------------- */ - -package com.java.griddyn; - -public class SWIGTYPE_p_double { - private transient long swigCPtr; - - protected SWIGTYPE_p_double(long cPtr, @SuppressWarnings("unused") boolean futureUse) { - swigCPtr = cPtr; - } - - protected SWIGTYPE_p_double() { - swigCPtr = 0; - } - - protected static long getCPtr(SWIGTYPE_p_double obj) { - return (obj == null) ? 0 : obj.swigCPtr; - } -} - diff --git a/interfaces/java/interface/SWIGTYPE_p_f_int_int_double__void.java b/interfaces/java/interface/SWIGTYPE_p_f_int_int_double__void.java deleted file mode 100644 index cffc1c86b..000000000 --- a/interfaces/java/interface/SWIGTYPE_p_f_int_int_double__void.java +++ /dev/null @@ -1,26 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.12 - * - * Do not make changes to this file unless you know what you are doing--modify - * the SWIG interface file instead. - * ----------------------------------------------------------------------------- */ - -package com.java.griddyn; - -public class SWIGTYPE_p_f_int_int_double__void { - private transient long swigCPtr; - - protected SWIGTYPE_p_f_int_int_double__void(long cPtr, @SuppressWarnings("unused") boolean futureUse) { - swigCPtr = cPtr; - } - - protected SWIGTYPE_p_f_int_int_double__void() { - swigCPtr = 0; - } - - protected static long getCPtr(SWIGTYPE_p_f_int_int_double__void obj) { - return (obj == null) ? 0 : obj.swigCPtr; - } -} - diff --git a/interfaces/java/interface/SWIGTYPE_p_int.java b/interfaces/java/interface/SWIGTYPE_p_int.java deleted file mode 100644 index 5828986e6..000000000 --- a/interfaces/java/interface/SWIGTYPE_p_int.java +++ /dev/null @@ -1,26 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.12 - * - * Do not make changes to this file unless you know what you are doing--modify - * the SWIG interface file instead. - * ----------------------------------------------------------------------------- */ - -package com.java.griddyn; - -public class SWIGTYPE_p_int { - private transient long swigCPtr; - - protected SWIGTYPE_p_int(long cPtr, @SuppressWarnings("unused") boolean futureUse) { - swigCPtr = cPtr; - } - - protected SWIGTYPE_p_int() { - swigCPtr = 0; - } - - protected static long getCPtr(SWIGTYPE_p_int obj) { - return (obj == null) ? 0 : obj.swigCPtr; - } -} - diff --git a/interfaces/java/interface/SWIGTYPE_p_p_char.java b/interfaces/java/interface/SWIGTYPE_p_p_char.java deleted file mode 100644 index 13a5edc0e..000000000 --- a/interfaces/java/interface/SWIGTYPE_p_p_char.java +++ /dev/null @@ -1,26 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.12 - * - * Do not make changes to this file unless you know what you are doing--modify - * the SWIG interface file instead. - * ----------------------------------------------------------------------------- */ - -package com.java.griddyn; - -public class SWIGTYPE_p_p_char { - private transient long swigCPtr; - - protected SWIGTYPE_p_p_char(long cPtr, @SuppressWarnings("unused") boolean futureUse) { - swigCPtr = cPtr; - } - - protected SWIGTYPE_p_p_char() { - swigCPtr = 0; - } - - protected static long getCPtr(SWIGTYPE_p_p_char obj) { - return (obj == null) ? 0 : obj.swigCPtr; - } -} - diff --git a/interfaces/java/interface/SWIGTYPE_p_void.java b/interfaces/java/interface/SWIGTYPE_p_void.java deleted file mode 100644 index 6a983fc3b..000000000 --- a/interfaces/java/interface/SWIGTYPE_p_void.java +++ /dev/null @@ -1,26 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.12 - * - * Do not make changes to this file unless you know what you are doing--modify - * the SWIG interface file instead. - * ----------------------------------------------------------------------------- */ - -package com.java.griddyn; - -public class SWIGTYPE_p_void { - private transient long swigCPtr; - - protected SWIGTYPE_p_void(long cPtr, @SuppressWarnings("unused") boolean futureUse) { - swigCPtr = cPtr; - } - - protected SWIGTYPE_p_void() { - swigCPtr = 0; - } - - protected static long getCPtr(SWIGTYPE_p_void obj) { - return (obj == null) ? 0 : obj.swigCPtr; - } -} - diff --git a/interfaces/java/interface/doubleArray.java b/interfaces/java/interface/doubleArray.java deleted file mode 100644 index b6847ddee..000000000 --- a/interfaces/java/interface/doubleArray.java +++ /dev/null @@ -1,60 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.12 - * - * Do not make changes to this file unless you know what you are doing--modify - * the SWIG interface file instead. - * ----------------------------------------------------------------------------- */ - -package com.java.griddyn; - -public class doubleArray { - private transient long swigCPtr; - protected transient boolean swigCMemOwn; - - protected doubleArray(long cPtr, boolean cMemoryOwn) { - swigCMemOwn = cMemoryOwn; - swigCPtr = cPtr; - } - - protected static long getCPtr(doubleArray obj) { - return (obj == null) ? 0 : obj.swigCPtr; - } - - protected void finalize() { - delete(); - } - - public synchronized void delete() { - if (swigCPtr != 0) { - if (swigCMemOwn) { - swigCMemOwn = false; - griddynJNI.delete_doubleArray(swigCPtr); - } - swigCPtr = 0; - } - } - - public doubleArray(int nelements) { - this(griddynJNI.new_doubleArray(nelements), true); - } - - public double getitem(int index) { - return griddynJNI.doubleArray_getitem(swigCPtr, this, index); - } - - public void setitem(int index, double value) { - griddynJNI.doubleArray_setitem(swigCPtr, this, index, value); - } - - public SWIGTYPE_p_double cast() { - long cPtr = griddynJNI.doubleArray_cast(swigCPtr, this); - return (cPtr == 0) ? null : new SWIGTYPE_p_double(cPtr, false); - } - - public static doubleArray frompointer(SWIGTYPE_p_double t) { - long cPtr = griddynJNI.doubleArray_frompointer(SWIGTYPE_p_double.getCPtr(t)); - return (cPtr == 0) ? null : new doubleArray(cPtr, false); - } - -} diff --git a/interfaces/java/interface/griddyn.java b/interfaces/java/interface/griddyn.java deleted file mode 100644 index 5193c86c6..000000000 --- a/interfaces/java/interface/griddyn.java +++ /dev/null @@ -1,374 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.12 - * - * Do not make changes to this file unless you know what you are doing--modify - * the SWIG interface file instead. - * ----------------------------------------------------------------------------- */ - -package com.java.griddyn; - -public class griddyn implements griddynConstants { - public static SWIGTYPE_p_double new_doublep() { - long cPtr = griddynJNI.new_doublep(); - return (cPtr == 0) ? null : new SWIGTYPE_p_double(cPtr, false); - } - - public static SWIGTYPE_p_double copy_doublep(double value) { - long cPtr = griddynJNI.copy_doublep(value); - return (cPtr == 0) ? null : new SWIGTYPE_p_double(cPtr, false); - } - - public static void delete_doublep(SWIGTYPE_p_double obj) { - griddynJNI.delete_doublep(SWIGTYPE_p_double.getCPtr(obj)); - } - - public static void doublep_assign(SWIGTYPE_p_double obj, double value) { - griddynJNI.doublep_assign(SWIGTYPE_p_double.getCPtr(obj), value); - } - - public static double doublep_value(SWIGTYPE_p_double obj) { - return griddynJNI.doublep_value(SWIGTYPE_p_double.getCPtr(obj)); - } - - public static String new_charp() { - return griddynJNI.new_charp(); - } - - public static String copy_charp(char value) { - return griddynJNI.copy_charp(value); - } - - public static void delete_charp(String obj) { - griddynJNI.delete_charp(obj); - } - - public static void charp_assign(String obj, char value) { - griddynJNI.charp_assign(obj, value); - } - - public static char charp_value(String obj) { - return griddynJNI.charp_value(obj); - } - - public static int gridDynSimulationGetResults(SWIGTYPE_p_void sim, String datatype, SWIGTYPE_p_double data, int maxSize) { - return griddynJNI.gridDynSimulationGetResults__SWIG_0(SWIGTYPE_p_void.getCPtr(sim), datatype, SWIGTYPE_p_double.getCPtr(data), maxSize); - } - - public static SWIGTYPE_p_void gridDynObjectCreate(String componentType, String objectType) { - long cPtr = griddynJNI.gridDynObjectCreate(componentType, objectType); - return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); - } - - public static SWIGTYPE_p_void gridDynObjectClone(SWIGTYPE_p_void obj) { - long cPtr = griddynJNI.gridDynObjectClone(SWIGTYPE_p_void.getCPtr(obj)); - return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); - } - - public static void gridDynObjectFree(SWIGTYPE_p_void obj) { - griddynJNI.gridDynObjectFree(SWIGTYPE_p_void.getCPtr(obj)); - } - - public static int gridDynObjectAdd(SWIGTYPE_p_void parentObject, SWIGTYPE_p_void objectToAdd) { - return griddynJNI.gridDynObjectAdd(SWIGTYPE_p_void.getCPtr(parentObject), SWIGTYPE_p_void.getCPtr(objectToAdd)); - } - - public static int gridDynObjectRemove(SWIGTYPE_p_void parentObject, SWIGTYPE_p_void objectToRemove) { - return griddynJNI.gridDynObjectRemove(SWIGTYPE_p_void.getCPtr(parentObject), SWIGTYPE_p_void.getCPtr(objectToRemove)); - } - - public static int gridDynObjectSetString(SWIGTYPE_p_void obj, String parameter, String value) { - return griddynJNI.gridDynObjectSetString(SWIGTYPE_p_void.getCPtr(obj), parameter, value); - } - - public static int gridDynObjectSetValue(SWIGTYPE_p_void obj, String parameter, double value) { - return griddynJNI.gridDynObjectSetValue(SWIGTYPE_p_void.getCPtr(obj), parameter, value); - } - - public static int gridDynObjectSetValueUnits(SWIGTYPE_p_void obj, String parameter, double value, String units) { - return griddynJNI.gridDynObjectSetValueUnits(SWIGTYPE_p_void.getCPtr(obj), parameter, value, units); - } - - public static int gridDynObjectSetFlag(SWIGTYPE_p_void obj, String flag, int val) { - return griddynJNI.gridDynObjectSetFlag(SWIGTYPE_p_void.getCPtr(obj), flag, val); - } - - public static int gridDynObjectGetString(SWIGTYPE_p_void obj, String parameter, String value, int N) { - return griddynJNI.gridDynObjectGetString(SWIGTYPE_p_void.getCPtr(obj), parameter, value, N); - } - - public static int gridDynObjectGetValue(SWIGTYPE_p_void obj, String parameter, SWIGTYPE_p_double result) { - return griddynJNI.gridDynObjectGetValue(SWIGTYPE_p_void.getCPtr(obj), parameter, SWIGTYPE_p_double.getCPtr(result)); - } - - public static int gridDynObjectGetValueUnits(SWIGTYPE_p_void obj, String parameter, String units, SWIGTYPE_p_double result) { - return griddynJNI.gridDynObjectGetValueUnits(SWIGTYPE_p_void.getCPtr(obj), parameter, units, SWIGTYPE_p_double.getCPtr(result)); - } - - public static int gridDynObjectGetFlag(SWIGTYPE_p_void obj, String flag, SWIGTYPE_p_int result) { - return griddynJNI.gridDynObjectGetFlag(SWIGTYPE_p_void.getCPtr(obj), flag, SWIGTYPE_p_int.getCPtr(result)); - } - - public static SWIGTYPE_p_void gridDynObjectFind(SWIGTYPE_p_void obj, String objectToFind) { - long cPtr = griddynJNI.gridDynObjectFind(SWIGTYPE_p_void.getCPtr(obj), objectToFind); - return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); - } - - public static SWIGTYPE_p_void gridDynObjectGetSubObject(SWIGTYPE_p_void obj, String componentType, int N) { - long cPtr = griddynJNI.gridDynObjectGetSubObject(SWIGTYPE_p_void.getCPtr(obj), componentType, N); - return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); - } - - public static SWIGTYPE_p_void gridDynObjectFindByUserId(SWIGTYPE_p_void obj, String componentType, int ID) { - long cPtr = griddynJNI.gridDynObjectFindByUserId(SWIGTYPE_p_void.getCPtr(obj), componentType, ID); - return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); - } - - public static SWIGTYPE_p_void gridDynObjectGetParent(SWIGTYPE_p_void obj) { - long cPtr = griddynJNI.gridDynObjectGetParent(SWIGTYPE_p_void.getCPtr(obj)); - return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); - } - - public static String gridDynObjectGetType(SWIGTYPE_p_void obj) { - return griddynJNI.gridDynObjectGetType(SWIGTYPE_p_void.getCPtr(obj)); - } - - public static SWIGTYPE_p_void gridDynSimulationCreate(String type, String name) { - long cPtr = griddynJNI.gridDynSimulationCreate(type, name); - return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); - } - - public static void gridDynSimulationFree(SWIGTYPE_p_void sim) { - griddynJNI.gridDynSimulationFree(SWIGTYPE_p_void.getCPtr(sim)); - } - - public static int gridDynSimulationInitializeFromString(SWIGTYPE_p_void sim, String initializationString) { - return griddynJNI.gridDynSimulationInitializeFromString(SWIGTYPE_p_void.getCPtr(sim), initializationString); - } - - public static int gridDynSimulationInitializeFromArgs(SWIGTYPE_p_void sim, int argc, SWIGTYPE_p_p_char argv, int ignoreUnrecognized) { - return griddynJNI.gridDynSimulationInitializeFromArgs(SWIGTYPE_p_void.getCPtr(sim), argc, SWIGTYPE_p_p_char.getCPtr(argv), ignoreUnrecognized); - } - - public static int gridDynSimulationLoadfile(SWIGTYPE_p_void sim, String fileName, String fileType) { - return griddynJNI.gridDynSimulationLoadfile(SWIGTYPE_p_void.getCPtr(sim), fileName, fileType); - } - - public static int gridDynSimulationAddCommand(SWIGTYPE_p_void sim, String command) { - return griddynJNI.gridDynSimulationAddCommand(SWIGTYPE_p_void.getCPtr(sim), command); - } - - public static int gridDynSimulationPowerflowInitialize(SWIGTYPE_p_void sim) { - return griddynJNI.gridDynSimulationPowerflowInitialize(SWIGTYPE_p_void.getCPtr(sim)); - } - - public static int gridDynSimulationPowerflow(SWIGTYPE_p_void sim) { - return griddynJNI.gridDynSimulationPowerflow(SWIGTYPE_p_void.getCPtr(sim)); - } - - public static int gridDynSimulationDynamicInitialize(SWIGTYPE_p_void sim) { - return griddynJNI.gridDynSimulationDynamicInitialize(SWIGTYPE_p_void.getCPtr(sim)); - } - - public static int gridDynSimulationReset(SWIGTYPE_p_void sim) { - return griddynJNI.gridDynSimulationReset(SWIGTYPE_p_void.getCPtr(sim)); - } - - public static double gridDynSimulationGetCurrentTime(SWIGTYPE_p_void sim) { - return griddynJNI.gridDynSimulationGetCurrentTime(SWIGTYPE_p_void.getCPtr(sim)); - } - - public static int gridDynSimulationRun(SWIGTYPE_p_void sim) { - return griddynJNI.gridDynSimulationRun(SWIGTYPE_p_void.getCPtr(sim)); - } - - public static int gridDynSimulationRunTo(SWIGTYPE_p_void sim, double runToTime) { - return griddynJNI.gridDynSimulationRunTo(SWIGTYPE_p_void.getCPtr(sim), runToTime); - } - - public static int gridDynSimulationStep(SWIGTYPE_p_void sim) { - return griddynJNI.gridDynSimulationStep(SWIGTYPE_p_void.getCPtr(sim)); - } - - public static int gridDynSimulationRunAsync(SWIGTYPE_p_void sim) { - return griddynJNI.gridDynSimulationRunAsync(SWIGTYPE_p_void.getCPtr(sim)); - } - - public static int gridDynSimulationRunToAsync(SWIGTYPE_p_void sim, double runToTime) { - return griddynJNI.gridDynSimulationRunToAsync(SWIGTYPE_p_void.getCPtr(sim), runToTime); - } - - public static int gridDynSimulationStepAsync(SWIGTYPE_p_void sim) { - return griddynJNI.gridDynSimulationStepAsync(SWIGTYPE_p_void.getCPtr(sim)); - } - - public static int gridDynSimulationGetStatus(SWIGTYPE_p_void sim) { - return griddynJNI.gridDynSimulationGetStatus(SWIGTYPE_p_void.getCPtr(sim)); - } - - public static SWIGTYPE_p_void getSimulationObject(SWIGTYPE_p_void sim) { - long cPtr = griddynJNI.getSimulationObject(SWIGTYPE_p_void.getCPtr(sim)); - return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); - } - - public static SWIGTYPE_p_void gridDynSimulationGetSolverKey(SWIGTYPE_p_void sim, String solverType) { - long cPtr = griddynJNI.gridDynSimulationGetSolverKey(SWIGTYPE_p_void.getCPtr(sim), solverType); - return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); - } - - public static void gridDynSolverKeyFree(SWIGTYPE_p_void key) { - griddynJNI.gridDynSolverKeyFree(SWIGTYPE_p_void.getCPtr(key)); - } - - public static int gridDynSimulationStateSize(SWIGTYPE_p_void sim, SWIGTYPE_p_void key) { - return griddynJNI.gridDynSimulationStateSize(SWIGTYPE_p_void.getCPtr(sim), SWIGTYPE_p_void.getCPtr(key)); - } - - public static int gridDynSimulationBusCount(SWIGTYPE_p_void sim) { - return griddynJNI.gridDynSimulationBusCount(SWIGTYPE_p_void.getCPtr(sim)); - } - - public static int gridDynSimulationLineCount(SWIGTYPE_p_void sim) { - return griddynJNI.gridDynSimulationLineCount(SWIGTYPE_p_void.getCPtr(sim)); - } - - public static int gridDynSimulationGuessState(SWIGTYPE_p_void sim, double time, SWIGTYPE_p_double states, SWIGTYPE_p_double dstate_dt, SWIGTYPE_p_void key) { - return griddynJNI.gridDynSimulationGuessState(SWIGTYPE_p_void.getCPtr(sim), time, SWIGTYPE_p_double.getCPtr(states), SWIGTYPE_p_double.getCPtr(dstate_dt), SWIGTYPE_p_void.getCPtr(key)); - } - - public static int gridDynSimulationSetState(SWIGTYPE_p_void sim, double time, SWIGTYPE_p_double states, SWIGTYPE_p_double dstate_dt, SWIGTYPE_p_void key) { - return griddynJNI.gridDynSimulationSetState(SWIGTYPE_p_void.getCPtr(sim), time, SWIGTYPE_p_double.getCPtr(states), SWIGTYPE_p_double.getCPtr(dstate_dt), SWIGTYPE_p_void.getCPtr(key)); - } - - public static int gridDynSimulationGetStateVariableTypes(SWIGTYPE_p_void sim, SWIGTYPE_p_double types, SWIGTYPE_p_void key) { - return griddynJNI.gridDynSimulationGetStateVariableTypes(SWIGTYPE_p_void.getCPtr(sim), SWIGTYPE_p_double.getCPtr(types), SWIGTYPE_p_void.getCPtr(key)); - } - - public static int gridDynSimulationResidual(SWIGTYPE_p_void sim, double time, SWIGTYPE_p_double resid, SWIGTYPE_p_double states, SWIGTYPE_p_double dstate_dt, SWIGTYPE_p_void key) { - return griddynJNI.gridDynSimulationResidual(SWIGTYPE_p_void.getCPtr(sim), time, SWIGTYPE_p_double.getCPtr(resid), SWIGTYPE_p_double.getCPtr(states), SWIGTYPE_p_double.getCPtr(dstate_dt), SWIGTYPE_p_void.getCPtr(key)); - } - - public static int gridDynSimulationDerivative(SWIGTYPE_p_void sim, double time, SWIGTYPE_p_double deriv, SWIGTYPE_p_double states, SWIGTYPE_p_void key) { - return griddynJNI.gridDynSimulationDerivative(SWIGTYPE_p_void.getCPtr(sim), time, SWIGTYPE_p_double.getCPtr(deriv), SWIGTYPE_p_double.getCPtr(states), SWIGTYPE_p_void.getCPtr(key)); - } - - public static int gridDynSimulationAlgebraicUpdate(SWIGTYPE_p_void sim, double time, SWIGTYPE_p_double update, SWIGTYPE_p_double states, double alpha, SWIGTYPE_p_void key) { - return griddynJNI.gridDynSimulationAlgebraicUpdate(SWIGTYPE_p_void.getCPtr(sim), time, SWIGTYPE_p_double.getCPtr(update), SWIGTYPE_p_double.getCPtr(states), alpha, SWIGTYPE_p_void.getCPtr(key)); - } - - public static int gridDynSimulationJacobian(SWIGTYPE_p_void sim, double time, SWIGTYPE_p_double states, SWIGTYPE_p_double dstate_dt, double cj, SWIGTYPE_p_void key, SWIGTYPE_p_f_int_int_double__void insert) { - return griddynJNI.gridDynSimulationJacobian(SWIGTYPE_p_void.getCPtr(sim), time, SWIGTYPE_p_double.getCPtr(states), SWIGTYPE_p_double.getCPtr(dstate_dt), cj, SWIGTYPE_p_void.getCPtr(key), SWIGTYPE_p_f_int_int_double__void.getCPtr(insert)); - } - - public static SWIGTYPE_p_void gridDynSingleQueryCreate(SWIGTYPE_p_void obj, String queryString) { - long cPtr = griddynJNI.gridDynSingleQueryCreate(SWIGTYPE_p_void.getCPtr(obj), queryString); - return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); - } - - public static SWIGTYPE_p_void gridDynVectorQueryCreate(SWIGTYPE_p_void obj, String queryString) { - long cPtr = griddynJNI.gridDynVectorQueryCreate(SWIGTYPE_p_void.getCPtr(obj), queryString); - return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); - } - - public static void gridDynSingleQueryFree(SWIGTYPE_p_void query) { - griddynJNI.gridDynSingleQueryFree(SWIGTYPE_p_void.getCPtr(query)); - } - - public static void gridDynVectorQueryFree(SWIGTYPE_p_void query) { - griddynJNI.gridDynVectorQueryFree(SWIGTYPE_p_void.getCPtr(query)); - } - - public static double gridDynSingleQueryRun(SWIGTYPE_p_void query) { - return griddynJNI.gridDynSingleQueryRun(SWIGTYPE_p_void.getCPtr(query)); - } - - public static int gridDynVectorQueryRun(SWIGTYPE_p_void query, SWIGTYPE_p_double data, int N) { - return griddynJNI.gridDynVectorQueryRun(SWIGTYPE_p_void.getCPtr(query), SWIGTYPE_p_double.getCPtr(data), N); - } - - public static int gridDynVectorQueryAppend(SWIGTYPE_p_void query, SWIGTYPE_p_void obj, String queryString) { - return griddynJNI.gridDynVectorQueryAppend(SWIGTYPE_p_void.getCPtr(query), SWIGTYPE_p_void.getCPtr(obj), queryString); - } - - public static int gridDynSingleQueryUpdate(SWIGTYPE_p_void query, SWIGTYPE_p_void obj, String queryString) { - return griddynJNI.gridDynSingleQueryUpdate(SWIGTYPE_p_void.getCPtr(query), SWIGTYPE_p_void.getCPtr(obj), queryString); - } - - public static int gridDynVectorQueryUpdate(SWIGTYPE_p_void query, SWIGTYPE_p_void obj, String queryString) { - return griddynJNI.gridDynVectorQueryUpdate(SWIGTYPE_p_void.getCPtr(query), SWIGTYPE_p_void.getCPtr(obj), queryString); - } - - public static SWIGTYPE_p_void gridDynEventCreate(String eventString, SWIGTYPE_p_void obj) { - long cPtr = griddynJNI.gridDynEventCreate(eventString, SWIGTYPE_p_void.getCPtr(obj)); - return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false); - } - - public static void gridDynEventFree(SWIGTYPE_p_void evnt) { - griddynJNI.gridDynEventFree(SWIGTYPE_p_void.getCPtr(evnt)); - } - - public static int gridDynEventTrigger(SWIGTYPE_p_void evnt) { - return griddynJNI.gridDynEventTrigger(SWIGTYPE_p_void.getCPtr(evnt)); - } - - public static int gridDynEventSchedule(SWIGTYPE_p_void evnt, SWIGTYPE_p_void sim) { - return griddynJNI.gridDynEventSchedule(SWIGTYPE_p_void.getCPtr(evnt), SWIGTYPE_p_void.getCPtr(sim)); - } - - public static int gridDynEventSetValue(SWIGTYPE_p_void evnt, String parameter, double value) { - return griddynJNI.gridDynEventSetValue(SWIGTYPE_p_void.getCPtr(evnt), parameter, value); - } - - public static int gridDynEventSetString(SWIGTYPE_p_void evnt, String parameter, String value) { - return griddynJNI.gridDynEventSetString(SWIGTYPE_p_void.getCPtr(evnt), parameter, value); - } - - public static int gridDynEventSetFlag(SWIGTYPE_p_void evnt, String flag, int val) { - return griddynJNI.gridDynEventSetFlag(SWIGTYPE_p_void.getCPtr(evnt), flag, val); - } - - public static int gridDynEventSetTarget(SWIGTYPE_p_void evnt, SWIGTYPE_p_void obj) { - return griddynJNI.gridDynEventSetTarget(SWIGTYPE_p_void.getCPtr(evnt), SWIGTYPE_p_void.getCPtr(obj)); - } - - public static int gridDynObjectStateSize(SWIGTYPE_p_void obj, SWIGTYPE_p_void key) { - return griddynJNI.gridDynObjectStateSize(SWIGTYPE_p_void.getCPtr(obj), SWIGTYPE_p_void.getCPtr(key)); - } - - public static int gridDynObjectGuessState(SWIGTYPE_p_void obj, double time, SWIGTYPE_p_double states, SWIGTYPE_p_double dstate_dt, SWIGTYPE_p_void key) { - return griddynJNI.gridDynObjectGuessState(SWIGTYPE_p_void.getCPtr(obj), time, SWIGTYPE_p_double.getCPtr(states), SWIGTYPE_p_double.getCPtr(dstate_dt), SWIGTYPE_p_void.getCPtr(key)); - } - - public static int gridDynObjectSetState(SWIGTYPE_p_void obj, double time, SWIGTYPE_p_double states, SWIGTYPE_p_double dstate_dt, SWIGTYPE_p_void key) { - return griddynJNI.gridDynObjectSetState(SWIGTYPE_p_void.getCPtr(obj), time, SWIGTYPE_p_double.getCPtr(states), SWIGTYPE_p_double.getCPtr(dstate_dt), SWIGTYPE_p_void.getCPtr(key)); - } - - public static int gridDynObjectGetStateVariableTypes(SWIGTYPE_p_void obj, SWIGTYPE_p_double types, SWIGTYPE_p_void key) { - return griddynJNI.gridDynObjectGetStateVariableTypes(SWIGTYPE_p_void.getCPtr(obj), SWIGTYPE_p_double.getCPtr(types), SWIGTYPE_p_void.getCPtr(key)); - } - - public static int gridDynObjectResidual(SWIGTYPE_p_void obj, SWIGTYPE_p_double inputs, int inputSize, SWIGTYPE_p_double resid, SWIGTYPE_p_void key) { - return griddynJNI.gridDynObjectResidual(SWIGTYPE_p_void.getCPtr(obj), SWIGTYPE_p_double.getCPtr(inputs), inputSize, SWIGTYPE_p_double.getCPtr(resid), SWIGTYPE_p_void.getCPtr(key)); - } - - public static int gridDynObjectDerivative(SWIGTYPE_p_void obj, SWIGTYPE_p_double inputs, int inputSize, SWIGTYPE_p_double deriv, SWIGTYPE_p_void key) { - return griddynJNI.gridDynObjectDerivative(SWIGTYPE_p_void.getCPtr(obj), SWIGTYPE_p_double.getCPtr(inputs), inputSize, SWIGTYPE_p_double.getCPtr(deriv), SWIGTYPE_p_void.getCPtr(key)); - } - - public static int gridDynObjectAlgebraicUpdate(SWIGTYPE_p_void obj, SWIGTYPE_p_double inputs, int inputSize, SWIGTYPE_p_double update, double alpha, SWIGTYPE_p_void key) { - return griddynJNI.gridDynObjectAlgebraicUpdate(SWIGTYPE_p_void.getCPtr(obj), SWIGTYPE_p_double.getCPtr(inputs), inputSize, SWIGTYPE_p_double.getCPtr(update), alpha, SWIGTYPE_p_void.getCPtr(key)); - } - - public static int gridDynObjectJacobian(SWIGTYPE_p_void obj, SWIGTYPE_p_double inputs, int inputSize, double cj, SWIGTYPE_p_f_int_int_double__void insert, SWIGTYPE_p_void key) { - return griddynJNI.gridDynObjectJacobian(SWIGTYPE_p_void.getCPtr(obj), SWIGTYPE_p_double.getCPtr(inputs), inputSize, cj, SWIGTYPE_p_f_int_int_double__void.getCPtr(insert), SWIGTYPE_p_void.getCPtr(key)); - } - - public static int gridDynObjectIoPartialDerivatives(SWIGTYPE_p_void obj, SWIGTYPE_p_double inputs, int inputSize, SWIGTYPE_p_f_int_int_double__void insert, SWIGTYPE_p_void key) { - return griddynJNI.gridDynObjectIoPartialDerivatives(SWIGTYPE_p_void.getCPtr(obj), SWIGTYPE_p_double.getCPtr(inputs), inputSize, SWIGTYPE_p_f_int_int_double__void.getCPtr(insert), SWIGTYPE_p_void.getCPtr(key)); - } - - public static int gridDynObjectOutputPartialDerivatives(SWIGTYPE_p_void obj, SWIGTYPE_p_double inputs, int inputSize, SWIGTYPE_p_f_int_int_double__void insert, SWIGTYPE_p_void key) { - return griddynJNI.gridDynObjectOutputPartialDerivatives(SWIGTYPE_p_void.getCPtr(obj), SWIGTYPE_p_double.getCPtr(inputs), inputSize, SWIGTYPE_p_f_int_int_double__void.getCPtr(insert), SWIGTYPE_p_void.getCPtr(key)); - } - -} diff --git a/interfaces/java/interface/griddynConstants.java b/interfaces/java/interface/griddynConstants.java deleted file mode 100644 index 06c6892d9..000000000 --- a/interfaces/java/interface/griddynConstants.java +++ /dev/null @@ -1,14 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.12 - * - * Do not make changes to this file unless you know what you are doing--modify - * the SWIG interface file instead. - * ----------------------------------------------------------------------------- */ - -package com.java.griddyn; - -public interface griddynConstants { - public final static int GRIDDYN_PENDING = griddynJNI.GRIDDYN_PENDING_get(); - public final static int GRIDDYN_COMPLETE = griddynJNI.GRIDDYN_COMPLETE_get(); -} diff --git a/interfaces/java/interface/griddynJNI.java b/interfaces/java/interface/griddynJNI.java deleted file mode 100644 index 377dc64ae..000000000 --- a/interfaces/java/interface/griddynJNI.java +++ /dev/null @@ -1,122 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.12 - * - * Do not make changes to this file unless you know what you are doing--modify - * the SWIG interface file instead. - * ----------------------------------------------------------------------------- */ - -package com.java.griddyn; - -public class griddynJNI { - static { - System.loadLibrary("JNIgriddynd"); - } - public final static native long new_doublep(); - public final static native long copy_doublep(double jarg1); - public final static native void delete_doublep(long jarg1); - public final static native void doublep_assign(long jarg1, double jarg2); - public final static native double doublep_value(long jarg1); - public final static native String new_charp(); - public final static native String copy_charp(char jarg1); - public final static native void delete_charp(String jarg1); - public final static native void charp_assign(String jarg1, char jarg2); - public final static native char charp_value(String jarg1); - public final static native long new_doubleArray(int jarg1); - public final static native void delete_doubleArray(long jarg1); - public final static native double doubleArray_getitem(long jarg1, doubleArray jarg1_, int jarg2); - public final static native void doubleArray_setitem(long jarg1, doubleArray jarg1_, int jarg2, double jarg3); - public final static native long doubleArray_cast(long jarg1, doubleArray jarg1_); - public final static native long doubleArray_frompointer(long jarg1); - public final static native int gridDynSimulationGetResults__SWIG_0(long jarg1, String jarg2, long jarg3, int jarg4); - public final static native int griddyn_ok_get(); - public final static native int griddyn_invalid_object_get(); - public final static native int griddyn_invalid_parameter_value_get(); - public final static native int griddyn_unknown_parameter_get(); - public final static native int griddyn_add_failure_get(); - public final static native int griddyn_remove_failure_get(); - public final static native int griddyn_query_load_failure_get(); - public final static native int griddyn_file_load_failure_get(); - public final static native int griddyn_solve_error_get(); - public final static native int griddyn_object_not_initialized_get(); - public final static native int griddyn_invalid_function_call_get(); - public final static native int griddyn_function_failure_get(); - public final static native int GRIDDYN_PENDING_get(); - public final static native int GRIDDYN_COMPLETE_get(); - public final static native long gridDynObjectCreate(String jarg1, String jarg2); - public final static native long gridDynObjectClone(long jarg1); - public final static native void gridDynObjectFree(long jarg1); - public final static native int gridDynObjectAdd(long jarg1, long jarg2); - public final static native int gridDynObjectRemove(long jarg1, long jarg2); - public final static native int gridDynObjectSetString(long jarg1, String jarg2, String jarg3); - public final static native int gridDynObjectSetValue(long jarg1, String jarg2, double jarg3); - public final static native int gridDynObjectSetValueUnits(long jarg1, String jarg2, double jarg3, String jarg4); - public final static native int gridDynObjectSetFlag(long jarg1, String jarg2, int jarg3); - public final static native int gridDynObjectGetString(long jarg1, String jarg2, String jarg3, int jarg4); - public final static native int gridDynObjectGetValue(long jarg1, String jarg2, long jarg3); - public final static native int gridDynObjectGetValueUnits(long jarg1, String jarg2, String jarg3, long jarg4); - public final static native int gridDynObjectGetFlag(long jarg1, String jarg2, long jarg3); - public final static native long gridDynObjectFind(long jarg1, String jarg2); - public final static native long gridDynObjectGetSubObject(long jarg1, String jarg2, int jarg3); - public final static native long gridDynObjectFindByUserId(long jarg1, String jarg2, int jarg3); - public final static native long gridDynObjectGetParent(long jarg1); - public final static native String gridDynObjectGetType(long jarg1); - public final static native long gridDynSimulationCreate(String jarg1, String jarg2); - public final static native void gridDynSimulationFree(long jarg1); - public final static native int gridDynSimulationInitializeFromString(long jarg1, String jarg2); - public final static native int gridDynSimulationInitializeFromArgs(long jarg1, int jarg2, long jarg3, int jarg4); - public final static native int gridDynSimulationLoadfile(long jarg1, String jarg2, String jarg3); - public final static native int gridDynSimulationAddCommand(long jarg1, String jarg2); - public final static native int gridDynSimulationPowerflowInitialize(long jarg1); - public final static native int gridDynSimulationPowerflow(long jarg1); - public final static native int gridDynSimulationDynamicInitialize(long jarg1); - public final static native int gridDynSimulationReset(long jarg1); - public final static native double gridDynSimulationGetCurrentTime(long jarg1); - public final static native int gridDynSimulationRun(long jarg1); - public final static native int gridDynSimulationRunTo(long jarg1, double jarg2); - public final static native int gridDynSimulationStep(long jarg1); - public final static native int gridDynSimulationRunAsync(long jarg1); - public final static native int gridDynSimulationRunToAsync(long jarg1, double jarg2); - public final static native int gridDynSimulationStepAsync(long jarg1); - public final static native int gridDynSimulationGetStatus(long jarg1); - public final static native long getSimulationObject(long jarg1); - public final static native long gridDynSimulationGetSolverKey(long jarg1, String jarg2); - public final static native void gridDynSolverKeyFree(long jarg1); - public final static native int gridDynSimulationStateSize(long jarg1, long jarg2); - public final static native int gridDynSimulationBusCount(long jarg1); - public final static native int gridDynSimulationLineCount(long jarg1); - public final static native int gridDynSimulationGuessState(long jarg1, double jarg2, long jarg3, long jarg4, long jarg5); - public final static native int gridDynSimulationSetState(long jarg1, double jarg2, long jarg3, long jarg4, long jarg5); - public final static native int gridDynSimulationGetStateVariableTypes(long jarg1, long jarg2, long jarg3); - public final static native int gridDynSimulationResidual(long jarg1, double jarg2, long jarg3, long jarg4, long jarg5, long jarg6); - public final static native int gridDynSimulationDerivative(long jarg1, double jarg2, long jarg3, long jarg4, long jarg5); - public final static native int gridDynSimulationAlgebraicUpdate(long jarg1, double jarg2, long jarg3, long jarg4, double jarg5, long jarg6); - public final static native int gridDynSimulationJacobian(long jarg1, double jarg2, long jarg3, long jarg4, double jarg5, long jarg6, long jarg7); - public final static native long gridDynSingleQueryCreate(long jarg1, String jarg2); - public final static native long gridDynVectorQueryCreate(long jarg1, String jarg2); - public final static native void gridDynSingleQueryFree(long jarg1); - public final static native void gridDynVectorQueryFree(long jarg1); - public final static native double gridDynSingleQueryRun(long jarg1); - public final static native int gridDynVectorQueryRun(long jarg1, long jarg2, int jarg3); - public final static native int gridDynVectorQueryAppend(long jarg1, long jarg2, String jarg3); - public final static native int gridDynSingleQueryUpdate(long jarg1, long jarg2, String jarg3); - public final static native int gridDynVectorQueryUpdate(long jarg1, long jarg2, String jarg3); - public final static native long gridDynEventCreate(String jarg1, long jarg2); - public final static native void gridDynEventFree(long jarg1); - public final static native int gridDynEventTrigger(long jarg1); - public final static native int gridDynEventSchedule(long jarg1, long jarg2); - public final static native int gridDynEventSetValue(long jarg1, String jarg2, double jarg3); - public final static native int gridDynEventSetString(long jarg1, String jarg2, String jarg3); - public final static native int gridDynEventSetFlag(long jarg1, String jarg2, int jarg3); - public final static native int gridDynEventSetTarget(long jarg1, long jarg2); - public final static native int gridDynObjectStateSize(long jarg1, long jarg2); - public final static native int gridDynObjectGuessState(long jarg1, double jarg2, long jarg3, long jarg4, long jarg5); - public final static native int gridDynObjectSetState(long jarg1, double jarg2, long jarg3, long jarg4, long jarg5); - public final static native int gridDynObjectGetStateVariableTypes(long jarg1, long jarg2, long jarg3); - public final static native int gridDynObjectResidual(long jarg1, long jarg2, int jarg3, long jarg4, long jarg5); - public final static native int gridDynObjectDerivative(long jarg1, long jarg2, int jarg3, long jarg4, long jarg5); - public final static native int gridDynObjectAlgebraicUpdate(long jarg1, long jarg2, int jarg3, long jarg4, double jarg5, long jarg6); - public final static native int gridDynObjectJacobian(long jarg1, long jarg2, int jarg3, double jarg4, long jarg5, long jarg6); - public final static native int gridDynObjectIoPartialDerivatives(long jarg1, long jarg2, int jarg3, long jarg4, long jarg5); - public final static native int gridDynObjectOutputPartialDerivatives(long jarg1, long jarg2, int jarg3, long jarg4, long jarg5); -} diff --git a/interfaces/java/interface/griddynJavaJAVA_wrap.c b/interfaces/java/interface/griddynJavaJAVA_wrap.c deleted file mode 100644 index 4a15d4fc8..000000000 --- a/interfaces/java/interface/griddynJavaJAVA_wrap.c +++ /dev/null @@ -1,2166 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.12 - * - * This file is not intended to be easily readable and contains a number of - * coding conventions designed to improve portability and efficiency. Do not make - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. - * ----------------------------------------------------------------------------- */ - - -#ifndef SWIGJAVA -#define SWIGJAVA -#endif - - -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if defined(__GNUC__) -# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - -/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ -#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) -# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 -#endif - -/* Intel's compiler complains if a variable which was never initialised is - * cast to void, which is a common idiom which we use to indicate that we - * are aware a variable isn't used. So we just silence that warning. - * See: https://github.com/swig/swig/issues/192 for more discussion. - */ -#ifdef __INTEL_COMPILER -# pragma warning disable 592 -#endif - - -/* Fix for jlong on some versions of gcc on Windows */ -#if defined(__GNUC__) && !defined(__INTEL_COMPILER) - typedef long long __int64; -#endif - -/* Fix for jlong on 64-bit x86 Solaris */ -#if defined(__x86_64) -# ifdef _LP64 -# undef _LP64 -# endif -#endif - -#include -#include -#include - - -/* Support for throwing Java exceptions */ -typedef enum { - SWIG_JavaOutOfMemoryError = 1, - SWIG_JavaIOException, - SWIG_JavaRuntimeException, - SWIG_JavaIndexOutOfBoundsException, - SWIG_JavaArithmeticException, - SWIG_JavaIllegalArgumentException, - SWIG_JavaNullPointerException, - SWIG_JavaDirectorPureVirtual, - SWIG_JavaUnknownError -} SWIG_JavaExceptionCodes; - -typedef struct { - SWIG_JavaExceptionCodes code; - const char *java_exception; -} SWIG_JavaExceptions_t; - - -static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg) { - jclass excep; - static const SWIG_JavaExceptions_t java_exceptions[] = { - { SWIG_JavaOutOfMemoryError, "java/lang/OutOfMemoryError" }, - { SWIG_JavaIOException, "java/io/IOException" }, - { SWIG_JavaRuntimeException, "java/lang/RuntimeException" }, - { SWIG_JavaIndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException" }, - { SWIG_JavaArithmeticException, "java/lang/ArithmeticException" }, - { SWIG_JavaIllegalArgumentException, "java/lang/IllegalArgumentException" }, - { SWIG_JavaNullPointerException, "java/lang/NullPointerException" }, - { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" }, - { SWIG_JavaUnknownError, "java/lang/UnknownError" }, - { (SWIG_JavaExceptionCodes)0, "java/lang/UnknownError" } - }; - const SWIG_JavaExceptions_t *except_ptr = java_exceptions; - - while (except_ptr->code != code && except_ptr->code) - except_ptr++; - - (*jenv)->ExceptionClear(jenv); - excep = (*jenv)->FindClass(jenv, except_ptr->java_exception); - if (excep) - (*jenv)->ThrowNew(jenv, excep, msg); -} - - -/* Contract support */ - -#define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else - - -static double *new_doublep() { - return (double *) calloc(1,sizeof(double)); -} - -static double *copy_doublep(double value) { - double *obj = (double *) calloc(1,sizeof(double)); - *obj = value; - return obj; -} - -static void delete_doublep(double *obj) { - if (obj) free(obj); -} - -static void doublep_assign(double *obj, double value) { - *obj = value; -} - -static double doublep_value(double *obj) { - return *obj; -} - - -static char *new_charp() { - return (char *) calloc(1,sizeof(char)); -} - -static char *copy_charp(char value) { - char *obj = (char *) calloc(1,sizeof(char)); - *obj = value; - return obj; -} - -static void delete_charp(char *obj) { - if (obj) free(obj); -} - -static void charp_assign(char *obj, char value) { - *obj = value; -} - -static char charp_value(char *obj) { - return *obj; -} - - -typedef double doubleArray; - -SWIGINTERN doubleArray *new_doubleArray(int nelements){ - return (double *) calloc(nelements,sizeof(double)); -} -SWIGINTERN void delete_doubleArray(doubleArray *self){ - free(self); -} -SWIGINTERN double doubleArray_getitem(doubleArray *self,int index){ - return self[index]; -} -SWIGINTERN void doubleArray_setitem(doubleArray *self,int index,double value){ - self[index] = value; -} -SWIGINTERN double *doubleArray_cast(doubleArray *self){ - return self; -} -SWIGINTERN doubleArray *doubleArray_frompointer(double *t){ - return (doubleArray *) t; -} - -#include "griddyn_export.h" -#include "griddyn_export_advanced.h" - - -#ifdef __cplusplus -extern "C" { -#endif - -SWIGEXPORT jlong JNICALL Java_com_java_griddyn_griddynJNI_new_1doublep(JNIEnv *jenv, jclass jcls) { - jlong jresult = 0 ; - double *result = 0 ; - - (void)jenv; - (void)jcls; - result = (double *)new_doublep(); - *(double **)&jresult = result; - return jresult; -} - - -SWIGEXPORT jlong JNICALL Java_com_java_griddyn_griddynJNI_copy_1doublep(JNIEnv *jenv, jclass jcls, jdouble jarg1) { - jlong jresult = 0 ; - double arg1 ; - double *result = 0 ; - - (void)jenv; - (void)jcls; - arg1 = (double)jarg1; - result = (double *)copy_doublep(arg1); - *(double **)&jresult = result; - return jresult; -} - - -SWIGEXPORT void JNICALL Java_com_java_griddyn_griddynJNI_delete_1doublep(JNIEnv *jenv, jclass jcls, jlong jarg1) { - double *arg1 = (double *) 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(double **)&jarg1; - delete_doublep(arg1); -} - - -SWIGEXPORT void JNICALL Java_com_java_griddyn_griddynJNI_doublep_1assign(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { - double *arg1 = (double *) 0 ; - double arg2 ; - - (void)jenv; - (void)jcls; - arg1 = *(double **)&jarg1; - arg2 = (double)jarg2; - doublep_assign(arg1,arg2); -} - - -SWIGEXPORT jdouble JNICALL Java_com_java_griddyn_griddynJNI_doublep_1value(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jdouble jresult = 0 ; - double *arg1 = (double *) 0 ; - double result; - - (void)jenv; - (void)jcls; - arg1 = *(double **)&jarg1; - result = (double)doublep_value(arg1); - jresult = (jdouble)result; - return jresult; -} - - -SWIGEXPORT jstring JNICALL Java_com_java_griddyn_griddynJNI_new_1charp(JNIEnv *jenv, jclass jcls) { - jstring jresult = 0 ; - char *result = 0 ; - - (void)jenv; - (void)jcls; - result = (char *)new_charp(); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); - return jresult; -} - - -SWIGEXPORT jstring JNICALL Java_com_java_griddyn_griddynJNI_copy_1charp(JNIEnv *jenv, jclass jcls, jchar jarg1) { - jstring jresult = 0 ; - char arg1 ; - char *result = 0 ; - - (void)jenv; - (void)jcls; - arg1 = (char)jarg1; - result = (char *)copy_charp(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); - return jresult; -} - - -SWIGEXPORT void JNICALL Java_com_java_griddyn_griddynJNI_delete_1charp(JNIEnv *jenv, jclass jcls, jstring jarg1) { - char *arg1 = (char *) 0 ; - - (void)jenv; - (void)jcls; - arg1 = 0; - if (jarg1) { - arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); - if (!arg1) return ; - } - delete_charp(arg1); - if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); -} - - -SWIGEXPORT void JNICALL Java_com_java_griddyn_griddynJNI_charp_1assign(JNIEnv *jenv, jclass jcls, jstring jarg1, jchar jarg2) { - char *arg1 = (char *) 0 ; - char arg2 ; - - (void)jenv; - (void)jcls; - arg1 = 0; - if (jarg1) { - arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); - if (!arg1) return ; - } - arg2 = (char)jarg2; - charp_assign(arg1,arg2); - if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); -} - - -SWIGEXPORT jchar JNICALL Java_com_java_griddyn_griddynJNI_charp_1value(JNIEnv *jenv, jclass jcls, jstring jarg1) { - jchar jresult = 0 ; - char *arg1 = (char *) 0 ; - char result; - - (void)jenv; - (void)jcls; - arg1 = 0; - if (jarg1) { - arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); - if (!arg1) return 0; - } - result = (char)charp_value(arg1); - jresult = (jchar)result; - if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); - return jresult; -} - - -SWIGEXPORT jlong JNICALL Java_com_java_griddyn_griddynJNI_new_1doubleArray(JNIEnv *jenv, jclass jcls, jint jarg1) { - jlong jresult = 0 ; - int arg1 ; - doubleArray *result = 0 ; - - (void)jenv; - (void)jcls; - arg1 = (int)jarg1; - result = (doubleArray *)new_doubleArray(arg1); - *(doubleArray **)&jresult = result; - return jresult; -} - - -SWIGEXPORT void JNICALL Java_com_java_griddyn_griddynJNI_delete_1doubleArray(JNIEnv *jenv, jclass jcls, jlong jarg1) { - doubleArray *arg1 = (doubleArray *) 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(doubleArray **)&jarg1; - delete_doubleArray(arg1); -} - - -SWIGEXPORT jdouble JNICALL Java_com_java_griddyn_griddynJNI_doubleArray_1getitem(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) { - jdouble jresult = 0 ; - doubleArray *arg1 = (doubleArray *) 0 ; - int arg2 ; - double result; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(doubleArray **)&jarg1; - arg2 = (int)jarg2; - result = (double)doubleArray_getitem(arg1,arg2); - jresult = (jdouble)result; - return jresult; -} - - -SWIGEXPORT void JNICALL Java_com_java_griddyn_griddynJNI_doubleArray_1setitem(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jdouble jarg3) { - doubleArray *arg1 = (doubleArray *) 0 ; - int arg2 ; - double arg3 ; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(doubleArray **)&jarg1; - arg2 = (int)jarg2; - arg3 = (double)jarg3; - doubleArray_setitem(arg1,arg2,arg3); -} - - -SWIGEXPORT jlong JNICALL Java_com_java_griddyn_griddynJNI_doubleArray_1cast(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) { - jlong jresult = 0 ; - doubleArray *arg1 = (doubleArray *) 0 ; - double *result = 0 ; - - (void)jenv; - (void)jcls; - (void)jarg1_; - arg1 = *(doubleArray **)&jarg1; - result = (double *)doubleArray_cast(arg1); - *(double **)&jresult = result; - return jresult; -} - - -SWIGEXPORT jlong JNICALL Java_com_java_griddyn_griddynJNI_doubleArray_1frompointer(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jlong jresult = 0 ; - double *arg1 = (double *) 0 ; - doubleArray *result = 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(double **)&jarg1; - result = (doubleArray *)doubleArray_frompointer(arg1); - *(doubleArray **)&jresult = result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationGetResults_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jlong jarg3, jint jarg4) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - char *arg2 = (char *) 0 ; - double *arg3 ; - int arg4 ; - int result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = *(double **)&jarg3; - arg4 = (int)jarg4; - result = (int)gridDynSimulationGetResults(arg1,(char const *)arg2,arg3,arg4); - jresult = (jint)result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_griddyn_1ok_1get(JNIEnv *jenv, jclass jcls) { - jint jresult = 0 ; - griddyn_status_enum result; - - (void)jenv; - (void)jcls; - result = (griddyn_status_enum)griddyn_ok; - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_griddyn_1invalid_1object_1get(JNIEnv *jenv, jclass jcls) { - jint jresult = 0 ; - griddyn_status_enum result; - - (void)jenv; - (void)jcls; - result = (griddyn_status_enum)griddyn_invalid_object; - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_griddyn_1invalid_1parameter_1value_1get(JNIEnv *jenv, jclass jcls) { - jint jresult = 0 ; - griddyn_status_enum result; - - (void)jenv; - (void)jcls; - result = (griddyn_status_enum)griddyn_invalid_parameter_value; - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_griddyn_1unknown_1parameter_1get(JNIEnv *jenv, jclass jcls) { - jint jresult = 0 ; - griddyn_status_enum result; - - (void)jenv; - (void)jcls; - result = (griddyn_status_enum)griddyn_unknown_parameter; - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_griddyn_1add_1failure_1get(JNIEnv *jenv, jclass jcls) { - jint jresult = 0 ; - griddyn_status_enum result; - - (void)jenv; - (void)jcls; - result = (griddyn_status_enum)griddyn_add_failure; - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_griddyn_1remove_1failure_1get(JNIEnv *jenv, jclass jcls) { - jint jresult = 0 ; - griddyn_status_enum result; - - (void)jenv; - (void)jcls; - result = (griddyn_status_enum)griddyn_remove_failure; - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_griddyn_1query_1load_1failure_1get(JNIEnv *jenv, jclass jcls) { - jint jresult = 0 ; - griddyn_status_enum result; - - (void)jenv; - (void)jcls; - result = (griddyn_status_enum)griddyn_query_load_failure; - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_griddyn_1file_1load_1failure_1get(JNIEnv *jenv, jclass jcls) { - jint jresult = 0 ; - griddyn_status_enum result; - - (void)jenv; - (void)jcls; - result = (griddyn_status_enum)griddyn_file_load_failure; - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_griddyn_1solve_1error_1get(JNIEnv *jenv, jclass jcls) { - jint jresult = 0 ; - griddyn_status_enum result; - - (void)jenv; - (void)jcls; - result = (griddyn_status_enum)griddyn_solve_error; - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_griddyn_1object_1not_1initialized_1get(JNIEnv *jenv, jclass jcls) { - jint jresult = 0 ; - griddyn_status_enum result; - - (void)jenv; - (void)jcls; - result = (griddyn_status_enum)griddyn_object_not_initialized; - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_griddyn_1invalid_1function_1call_1get(JNIEnv *jenv, jclass jcls) { - jint jresult = 0 ; - griddyn_status_enum result; - - (void)jenv; - (void)jcls; - result = (griddyn_status_enum)griddyn_invalid_function_call; - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_griddyn_1function_1failure_1get(JNIEnv *jenv, jclass jcls) { - jint jresult = 0 ; - griddyn_status_enum result; - - (void)jenv; - (void)jcls; - result = (griddyn_status_enum)griddyn_function_failure; - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_GRIDDYN_1PENDING_1get(JNIEnv *jenv, jclass jcls) { - jint jresult = 0 ; - int result; - - (void)jenv; - (void)jcls; - result = (int)((25)); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_GRIDDYN_1COMPLETE_1get(JNIEnv *jenv, jclass jcls) { - jint jresult = 0 ; - int result; - - (void)jenv; - (void)jcls; - result = (int)((30)); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jlong JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectCreate(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) { - jlong jresult = 0 ; - char *arg1 = (char *) 0 ; - char *arg2 = (char *) 0 ; - GridDynObject result; - - (void)jenv; - (void)jcls; - arg1 = 0; - if (jarg1) { - arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); - if (!arg1) return 0; - } - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - result = (GridDynObject)gridDynObjectCreate((char const *)arg1,(char const *)arg2); - *(GridDynObject *)&jresult = result; - if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jlong JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectClone(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jlong jresult = 0 ; - GridDynObject arg1 = (GridDynObject) (GridDynObject)0 ; - GridDynObject result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - result = (GridDynObject)gridDynObjectClone(arg1); - *(GridDynObject *)&jresult = result; - return jresult; -} - - -SWIGEXPORT void JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectFree(JNIEnv *jenv, jclass jcls, jlong jarg1) { - GridDynObject arg1 = (GridDynObject) 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - gridDynObjectFree(arg1); -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectAdd(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { - jint jresult = 0 ; - GridDynObject arg1 = (GridDynObject) 0 ; - GridDynObject arg2 = (GridDynObject) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = *(GridDynObject *)&jarg2; - result = (griddyn_status)gridDynObjectAdd(arg1,arg2); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectRemove(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { - jint jresult = 0 ; - GridDynObject arg1 = (GridDynObject) 0 ; - GridDynObject arg2 = (GridDynObject) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = *(GridDynObject *)&jarg2; - result = (griddyn_status)gridDynObjectRemove(arg1,arg2); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectSetString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { - jint jresult = 0 ; - GridDynObject arg1 = (GridDynObject) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return 0; - } - result = (griddyn_status)gridDynObjectSetString(arg1,(char const *)arg2,(char const *)arg3); - jresult = (jint)result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectSetValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jdouble jarg3) { - jint jresult = 0 ; - GridDynObject arg1 = (GridDynObject) 0 ; - char *arg2 = (char *) 0 ; - double arg3 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = (double)jarg3; - result = (griddyn_status)gridDynObjectSetValue(arg1,(char const *)arg2,arg3); - jresult = (jint)result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectSetValueUnits(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jdouble jarg3, jstring jarg4) { - jint jresult = 0 ; - GridDynObject arg1 = (GridDynObject) 0 ; - char *arg2 = (char *) 0 ; - double arg3 ; - char *arg4 = (char *) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = (double)jarg3; - arg4 = 0; - if (jarg4) { - arg4 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg4, 0); - if (!arg4) return 0; - } - result = (griddyn_status)gridDynObjectSetValueUnits(arg1,(char const *)arg2,arg3,(char const *)arg4); - jresult = (jint)result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg4) (*jenv)->ReleaseStringUTFChars(jenv, jarg4, (const char *)arg4); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectSetFlag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jint jarg3) { - jint jresult = 0 ; - GridDynObject arg1 = (GridDynObject) 0 ; - char *arg2 = (char *) 0 ; - int arg3 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = (int)jarg3; - result = (griddyn_status)gridDynObjectSetFlag(arg1,(char const *)arg2,arg3); - jresult = (jint)result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectGetString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3, jint jarg4) { - jint jresult = 0 ; - GridDynObject arg1 = (GridDynObject) (GridDynObject)0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - int arg4 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return 0; - } - arg4 = (int)jarg4; - result = (griddyn_status)gridDynObjectGetString(arg1,(char const *)arg2,arg3,arg4); - jresult = (jint)result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectGetValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jlong jarg3) { - jint jresult = 0 ; - GridDynObject arg1 = (GridDynObject) (GridDynObject)0 ; - char *arg2 = (char *) 0 ; - double *arg3 = (double *) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = *(double **)&jarg3; - result = (griddyn_status)gridDynObjectGetValue(arg1,(char const *)arg2,arg3); - jresult = (jint)result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectGetValueUnits(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3, jlong jarg4) { - jint jresult = 0 ; - GridDynObject arg1 = (GridDynObject) (GridDynObject)0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - double *arg4 = (double *) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return 0; - } - arg4 = *(double **)&jarg4; - result = (griddyn_status)gridDynObjectGetValueUnits(arg1,(char const *)arg2,(char const *)arg3,arg4); - jresult = (jint)result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectGetFlag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jlong jarg3) { - jint jresult = 0 ; - GridDynObject arg1 = (GridDynObject) (GridDynObject)0 ; - char *arg2 = (char *) 0 ; - int *arg3 = (int *) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = *(int **)&jarg3; - result = (griddyn_status)gridDynObjectGetFlag(arg1,(char const *)arg2,arg3); - jresult = (jint)result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jlong JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectFind(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - jlong jresult = 0 ; - GridDynObject arg1 = (GridDynObject) (GridDynObject)0 ; - char *arg2 = (char *) 0 ; - GridDynObject result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - result = (GridDynObject)gridDynObjectFind(arg1,(char const *)arg2); - *(GridDynObject *)&jresult = result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jlong JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectGetSubObject(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jint jarg3) { - jlong jresult = 0 ; - GridDynObject arg1 = (GridDynObject) (GridDynObject)0 ; - char *arg2 = (char *) 0 ; - int arg3 ; - GridDynObject result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = (int)jarg3; - result = (GridDynObject)gridDynObjectGetSubObject(arg1,(char const *)arg2,arg3); - *(GridDynObject *)&jresult = result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jlong JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectFindByUserId(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jint jarg3) { - jlong jresult = 0 ; - GridDynObject arg1 = (GridDynObject) (GridDynObject)0 ; - char *arg2 = (char *) 0 ; - int arg3 ; - GridDynObject result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = (int)jarg3; - result = (GridDynObject)gridDynObjectFindByUserId(arg1,(char const *)arg2,arg3); - *(GridDynObject *)&jresult = result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jlong JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectGetParent(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jlong jresult = 0 ; - GridDynObject arg1 = (GridDynObject) (GridDynObject)0 ; - GridDynObject result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - result = (GridDynObject)gridDynObjectGetParent(arg1); - *(GridDynObject *)&jresult = result; - return jresult; -} - - -SWIGEXPORT jstring JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectGetType(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jstring jresult = 0 ; - GridDynObject arg1 = (GridDynObject) (GridDynObject)0 ; - char *result = 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - result = (char *)gridDynObjectGetType(arg1); - if (result) jresult = (*jenv)->NewStringUTF(jenv, (const char *)result); - return jresult; -} - - -SWIGEXPORT jlong JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationCreate(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2) { - jlong jresult = 0 ; - char *arg1 = (char *) 0 ; - char *arg2 = (char *) 0 ; - GridDynSimulation result; - - (void)jenv; - (void)jcls; - arg1 = 0; - if (jarg1) { - arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); - if (!arg1) return 0; - } - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - result = (GridDynSimulation)gridDynSimulationCreate((char const *)arg1,(char const *)arg2); - *(GridDynSimulation *)&jresult = result; - if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT void JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationFree(JNIEnv *jenv, jclass jcls, jlong jarg1) { - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - gridDynSimulationFree(arg1); -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationInitializeFromString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - char *arg2 = (char *) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - result = (griddyn_status)gridDynSimulationInitializeFromString(arg1,(char const *)arg2); - jresult = (jint)result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationInitializeFromArgs(JNIEnv *jenv, jclass jcls, jlong jarg1, jint jarg2, jlong jarg3, jint jarg4) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - int arg2 ; - char **arg3 ; - int arg4 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - arg2 = (int)jarg2; - arg3 = *(char ***)&jarg3; - arg4 = (int)jarg4; - result = (griddyn_status)gridDynSimulationInitializeFromArgs(arg1,arg2,arg3,arg4); - jresult = (jint)result; - - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationLoadfile(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return 0; - } - result = (griddyn_status)gridDynSimulationLoadfile(arg1,(char const *)arg2,(char const *)arg3); - jresult = (jint)result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationAddCommand(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - char *arg2 = (char *) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - result = (griddyn_status)gridDynSimulationAddCommand(arg1,(char const *)arg2); - jresult = (jint)result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationPowerflowInitialize(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - result = (griddyn_status)gridDynSimulationPowerflowInitialize(arg1); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationPowerflow(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - result = (griddyn_status)gridDynSimulationPowerflow(arg1); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationDynamicInitialize(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - result = (griddyn_status)gridDynSimulationDynamicInitialize(arg1); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationReset(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - result = (griddyn_status)gridDynSimulationReset(arg1); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jdouble JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationGetCurrentTime(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jdouble jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - double result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - result = (double)gridDynSimulationGetCurrentTime(arg1); - jresult = (jdouble)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationRun(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - result = (griddyn_status)gridDynSimulationRun(arg1); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationRunTo(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - double arg2 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - arg2 = (double)jarg2; - result = (griddyn_status)gridDynSimulationRunTo(arg1,arg2); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationStep(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - result = (griddyn_status)gridDynSimulationStep(arg1); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationRunAsync(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - result = (griddyn_status)gridDynSimulationRunAsync(arg1); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationRunToAsync(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - double arg2 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - arg2 = (double)jarg2; - result = (griddyn_status)gridDynSimulationRunToAsync(arg1,arg2); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationStepAsync(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - result = (griddyn_status)gridDynSimulationStepAsync(arg1); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationGetStatus(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - int result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - result = (int)gridDynSimulationGetStatus(arg1); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jlong JNICALL Java_com_java_griddyn_griddynJNI_getSimulationObject(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jlong jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - GridDynObject result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - result = (GridDynObject)getSimulationObject(arg1); - *(GridDynObject *)&jresult = result; - return jresult; -} - - -SWIGEXPORT jlong JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationGetSolverKey(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - jlong jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - char *arg2 = (char *) 0 ; - SolverKey result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - result = (SolverKey)gridDynSimulationGetSolverKey(arg1,(char const *)arg2); - *(SolverKey *)&jresult = result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT void JNICALL Java_com_java_griddyn_griddynJNI_gridDynSolverKeyFree(JNIEnv *jenv, jclass jcls, jlong jarg1) { - SolverKey arg1 = (SolverKey) 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(SolverKey *)&jarg1; - gridDynSolverKeyFree(arg1); -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationStateSize(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - SolverKey arg2 = (SolverKey) 0 ; - int result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - arg2 = *(SolverKey *)&jarg2; - result = (int)gridDynSimulationStateSize(arg1,arg2); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationBusCount(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - int result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - result = (int)gridDynSimulationBusCount(arg1); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationLineCount(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - int result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - result = (int)gridDynSimulationLineCount(arg1); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationGuessState(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2, jlong jarg3, jlong jarg4, jlong jarg5) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - double arg2 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - SolverKey arg5 = (SolverKey) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - arg2 = (double)jarg2; - arg3 = *(double **)&jarg3; - arg4 = *(double **)&jarg4; - arg5 = *(SolverKey *)&jarg5; - result = (griddyn_status)gridDynSimulationGuessState(arg1,arg2,arg3,arg4,arg5); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationSetState(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2, jlong jarg3, jlong jarg4, jlong jarg5) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - double arg2 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - SolverKey arg5 = (SolverKey) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - arg2 = (double)jarg2; - arg3 = *(double **)&jarg3; - arg4 = *(double **)&jarg4; - arg5 = *(SolverKey *)&jarg5; - result = (griddyn_status)gridDynSimulationSetState(arg1,arg2,(double const *)arg3,(double const *)arg4,arg5); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationGetStateVariableTypes(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jlong jarg3) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - double *arg2 = (double *) 0 ; - SolverKey arg3 = (SolverKey) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - arg2 = *(double **)&jarg2; - arg3 = *(SolverKey *)&jarg3; - result = (griddyn_status)gridDynSimulationGetStateVariableTypes(arg1,arg2,arg3); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationResidual(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2, jlong jarg3, jlong jarg4, jlong jarg5, jlong jarg6) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - double arg2 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; - SolverKey arg6 = (SolverKey) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - arg2 = (double)jarg2; - arg3 = *(double **)&jarg3; - arg4 = *(double **)&jarg4; - arg5 = *(double **)&jarg5; - arg6 = *(SolverKey *)&jarg6; - result = (griddyn_status)gridDynSimulationResidual(arg1,arg2,arg3,(double const *)arg4,(double const *)arg5,arg6); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationDerivative(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2, jlong jarg3, jlong jarg4, jlong jarg5) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - double arg2 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - SolverKey arg5 = (SolverKey) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - arg2 = (double)jarg2; - arg3 = *(double **)&jarg3; - arg4 = *(double **)&jarg4; - arg5 = *(SolverKey *)&jarg5; - result = (griddyn_status)gridDynSimulationDerivative(arg1,arg2,arg3,(double const *)arg4,arg5); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationAlgebraicUpdate(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2, jlong jarg3, jlong jarg4, jdouble jarg5, jlong jarg6) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - double arg2 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double arg5 ; - SolverKey arg6 = (SolverKey) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - arg2 = (double)jarg2; - arg3 = *(double **)&jarg3; - arg4 = *(double **)&jarg4; - arg5 = (double)jarg5; - arg6 = *(SolverKey *)&jarg6; - result = (griddyn_status)gridDynSimulationAlgebraicUpdate(arg1,arg2,arg3,(double const *)arg4,arg5,arg6); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSimulationJacobian(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2, jlong jarg3, jlong jarg4, jdouble jarg5, jlong jarg6, jlong jarg7) { - jint jresult = 0 ; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - double arg2 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double arg5 ; - SolverKey arg6 = (SolverKey) 0 ; - void (*arg7)(int,int,double) = (void (*)(int,int,double)) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSimulation *)&jarg1; - arg2 = (double)jarg2; - arg3 = *(double **)&jarg3; - arg4 = *(double **)&jarg4; - arg5 = (double)jarg5; - arg6 = *(SolverKey *)&jarg6; - arg7 = *(void (**)(int,int,double))&jarg7; - result = (griddyn_status)gridDynSimulationJacobian(arg1,arg2,(double const *)arg3,(double const *)arg4,arg5,arg6,arg7); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jlong JNICALL Java_com_java_griddyn_griddynJNI_gridDynSingleQueryCreate(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - jlong jresult = 0 ; - GridDynObject arg1 = (GridDynObject) 0 ; - char *arg2 = (char *) 0 ; - GridDynSingleQuery result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - result = (GridDynSingleQuery)gridDynSingleQueryCreate(arg1,(char const *)arg2); - *(GridDynSingleQuery *)&jresult = result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jlong JNICALL Java_com_java_griddyn_griddynJNI_gridDynVectorQueryCreate(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2) { - jlong jresult = 0 ; - GridDynObject arg1 = (GridDynObject) 0 ; - char *arg2 = (char *) 0 ; - GridDynVectorQuery result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - result = (GridDynVectorQuery)gridDynVectorQueryCreate(arg1,(char const *)arg2); - *(GridDynVectorQuery *)&jresult = result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT void JNICALL Java_com_java_griddyn_griddynJNI_gridDynSingleQueryFree(JNIEnv *jenv, jclass jcls, jlong jarg1) { - GridDynSingleQuery arg1 = (GridDynSingleQuery) 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSingleQuery *)&jarg1; - gridDynSingleQueryFree(arg1); -} - - -SWIGEXPORT void JNICALL Java_com_java_griddyn_griddynJNI_gridDynVectorQueryFree(JNIEnv *jenv, jclass jcls, jlong jarg1) { - GridDynVectorQuery arg1 = (GridDynVectorQuery) 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynVectorQuery *)&jarg1; - gridDynVectorQueryFree(arg1); -} - - -SWIGEXPORT jdouble JNICALL Java_com_java_griddyn_griddynJNI_gridDynSingleQueryRun(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jdouble jresult = 0 ; - GridDynSingleQuery arg1 = (GridDynSingleQuery) 0 ; - double result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSingleQuery *)&jarg1; - result = (double)gridDynSingleQueryRun(arg1); - jresult = (jdouble)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynVectorQueryRun(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3) { - jint jresult = 0 ; - GridDynVectorQuery arg1 = (GridDynVectorQuery) 0 ; - double *arg2 = (double *) 0 ; - int arg3 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynVectorQuery *)&jarg1; - arg2 = *(double **)&jarg2; - arg3 = (int)jarg3; - result = (griddyn_status)gridDynVectorQueryRun(arg1,arg2,arg3); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynVectorQueryAppend(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jstring jarg3) { - jint jresult = 0 ; - GridDynVectorQuery arg1 = (GridDynVectorQuery) 0 ; - GridDynObject arg2 = (GridDynObject) 0 ; - char *arg3 = (char *) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynVectorQuery *)&jarg1; - arg2 = *(GridDynObject *)&jarg2; - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return 0; - } - result = (griddyn_status)gridDynVectorQueryAppend(arg1,arg2,(char const *)arg3); - jresult = (jint)result; - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynSingleQueryUpdate(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jstring jarg3) { - jint jresult = 0 ; - GridDynSingleQuery arg1 = (GridDynSingleQuery) 0 ; - GridDynObject arg2 = (GridDynObject) 0 ; - char *arg3 = (char *) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynSingleQuery *)&jarg1; - arg2 = *(GridDynObject *)&jarg2; - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return 0; - } - result = (griddyn_status)gridDynSingleQueryUpdate(arg1,arg2,(char const *)arg3); - jresult = (jint)result; - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynVectorQueryUpdate(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jstring jarg3) { - jint jresult = 0 ; - GridDynVectorQuery arg1 = (GridDynVectorQuery) 0 ; - GridDynObject arg2 = (GridDynObject) 0 ; - char *arg3 = (char *) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynVectorQuery *)&jarg1; - arg2 = *(GridDynObject *)&jarg2; - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return 0; - } - result = (griddyn_status)gridDynVectorQueryUpdate(arg1,arg2,(char const *)arg3); - jresult = (jint)result; - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); - return jresult; -} - - -SWIGEXPORT jlong JNICALL Java_com_java_griddyn_griddynJNI_gridDynEventCreate(JNIEnv *jenv, jclass jcls, jstring jarg1, jlong jarg2) { - jlong jresult = 0 ; - char *arg1 = (char *) 0 ; - GridDynObject arg2 = (GridDynObject) 0 ; - GridDynEvent result; - - (void)jenv; - (void)jcls; - arg1 = 0; - if (jarg1) { - arg1 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg1, 0); - if (!arg1) return 0; - } - arg2 = *(GridDynObject *)&jarg2; - result = (GridDynEvent)gridDynEventCreate((char const *)arg1,arg2); - *(GridDynEvent *)&jresult = result; - if (arg1) (*jenv)->ReleaseStringUTFChars(jenv, jarg1, (const char *)arg1); - return jresult; -} - - -SWIGEXPORT void JNICALL Java_com_java_griddyn_griddynJNI_gridDynEventFree(JNIEnv *jenv, jclass jcls, jlong jarg1) { - GridDynEvent arg1 = (GridDynEvent) 0 ; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynEvent *)&jarg1; - gridDynEventFree(arg1); -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynEventTrigger(JNIEnv *jenv, jclass jcls, jlong jarg1) { - jint jresult = 0 ; - GridDynEvent arg1 = (GridDynEvent) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynEvent *)&jarg1; - result = (griddyn_status)gridDynEventTrigger(arg1); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynEventSchedule(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { - jint jresult = 0 ; - GridDynEvent arg1 = (GridDynEvent) 0 ; - GridDynSimulation arg2 = (GridDynSimulation) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynEvent *)&jarg1; - arg2 = *(GridDynSimulation *)&jarg2; - result = (griddyn_status)gridDynEventSchedule(arg1,arg2); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynEventSetValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jdouble jarg3) { - jint jresult = 0 ; - GridDynEvent arg1 = (GridDynEvent) 0 ; - char *arg2 = (char *) 0 ; - double arg3 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynEvent *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = (double)jarg3; - result = (griddyn_status)gridDynEventSetValue(arg1,(char const *)arg2,arg3); - jresult = (jint)result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynEventSetString(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jstring jarg3) { - jint jresult = 0 ; - GridDynEvent arg1 = (GridDynEvent) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynEvent *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = 0; - if (jarg3) { - arg3 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg3, 0); - if (!arg3) return 0; - } - result = (griddyn_status)gridDynEventSetString(arg1,(char const *)arg2,(char const *)arg3); - jresult = (jint)result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - if (arg3) (*jenv)->ReleaseStringUTFChars(jenv, jarg3, (const char *)arg3); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynEventSetFlag(JNIEnv *jenv, jclass jcls, jlong jarg1, jstring jarg2, jint jarg3) { - jint jresult = 0 ; - GridDynEvent arg1 = (GridDynEvent) 0 ; - char *arg2 = (char *) 0 ; - int arg3 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynEvent *)&jarg1; - arg2 = 0; - if (jarg2) { - arg2 = (char *)(*jenv)->GetStringUTFChars(jenv, jarg2, 0); - if (!arg2) return 0; - } - arg3 = (int)jarg3; - result = (griddyn_status)gridDynEventSetFlag(arg1,(char const *)arg2,arg3); - jresult = (jint)result; - if (arg2) (*jenv)->ReleaseStringUTFChars(jenv, jarg2, (const char *)arg2); - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynEventSetTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { - jint jresult = 0 ; - GridDynEvent arg1 = (GridDynEvent) 0 ; - GridDynObject arg2 = (GridDynObject) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynEvent *)&jarg1; - arg2 = *(GridDynObject *)&jarg2; - result = (griddyn_status)gridDynEventSetTarget(arg1,arg2); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectStateSize(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) { - jint jresult = 0 ; - GridDynObject arg1 = (GridDynObject) 0 ; - SolverKey arg2 = (SolverKey) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = *(SolverKey *)&jarg2; - result = (griddyn_status)gridDynObjectStateSize(arg1,arg2); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectGuessState(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2, jlong jarg3, jlong jarg4, jlong jarg5) { - jint jresult = 0 ; - GridDynObject arg1 = (GridDynObject) 0 ; - double arg2 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - SolverKey arg5 = (SolverKey) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = (double)jarg2; - arg3 = *(double **)&jarg3; - arg4 = *(double **)&jarg4; - arg5 = *(SolverKey *)&jarg5; - result = (griddyn_status)gridDynObjectGuessState(arg1,arg2,arg3,arg4,arg5); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectSetState(JNIEnv *jenv, jclass jcls, jlong jarg1, jdouble jarg2, jlong jarg3, jlong jarg4, jlong jarg5) { - jint jresult = 0 ; - GridDynObject arg1 = (GridDynObject) 0 ; - double arg2 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - SolverKey arg5 = (SolverKey) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = (double)jarg2; - arg3 = *(double **)&jarg3; - arg4 = *(double **)&jarg4; - arg5 = *(SolverKey *)&jarg5; - result = (griddyn_status)gridDynObjectSetState(arg1,arg2,(double const *)arg3,(double const *)arg4,arg5); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectGetStateVariableTypes(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jlong jarg3) { - jint jresult = 0 ; - GridDynObject arg1 = (GridDynObject) 0 ; - double *arg2 = (double *) 0 ; - SolverKey arg3 = (SolverKey) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = *(double **)&jarg2; - arg3 = *(SolverKey *)&jarg3; - result = (griddyn_status)gridDynObjectGetStateVariableTypes(arg1,arg2,arg3); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectResidual(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jlong jarg4, jlong jarg5) { - jint jresult = 0 ; - GridDynObject arg1 = (GridDynObject) 0 ; - double *arg2 = (double *) 0 ; - int arg3 ; - double *arg4 = (double *) 0 ; - SolverKey arg5 = (SolverKey) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = *(double **)&jarg2; - arg3 = (int)jarg3; - arg4 = *(double **)&jarg4; - arg5 = *(SolverKey *)&jarg5; - result = (griddyn_status)gridDynObjectResidual(arg1,(double const *)arg2,arg3,arg4,arg5); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectDerivative(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jlong jarg4, jlong jarg5) { - jint jresult = 0 ; - GridDynObject arg1 = (GridDynObject) 0 ; - double *arg2 = (double *) 0 ; - int arg3 ; - double *arg4 = (double *) 0 ; - SolverKey arg5 = (SolverKey) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = *(double **)&jarg2; - arg3 = (int)jarg3; - arg4 = *(double **)&jarg4; - arg5 = *(SolverKey *)&jarg5; - result = (griddyn_status)gridDynObjectDerivative(arg1,(double const *)arg2,arg3,arg4,arg5); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectAlgebraicUpdate(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jlong jarg4, jdouble jarg5, jlong jarg6) { - jint jresult = 0 ; - GridDynObject arg1 = (GridDynObject) 0 ; - double *arg2 = (double *) 0 ; - int arg3 ; - double *arg4 = (double *) 0 ; - double arg5 ; - SolverKey arg6 = (SolverKey) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = *(double **)&jarg2; - arg3 = (int)jarg3; - arg4 = *(double **)&jarg4; - arg5 = (double)jarg5; - arg6 = *(SolverKey *)&jarg6; - result = (griddyn_status)gridDynObjectAlgebraicUpdate(arg1,(double const *)arg2,arg3,arg4,arg5,arg6); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectJacobian(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jdouble jarg4, jlong jarg5, jlong jarg6) { - jint jresult = 0 ; - GridDynObject arg1 = (GridDynObject) 0 ; - double *arg2 = (double *) 0 ; - int arg3 ; - double arg4 ; - void (*arg5)(int,int,double) = (void (*)(int,int,double)) 0 ; - SolverKey arg6 = (SolverKey) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = *(double **)&jarg2; - arg3 = (int)jarg3; - arg4 = (double)jarg4; - arg5 = *(void (**)(int,int,double))&jarg5; - arg6 = *(SolverKey *)&jarg6; - result = (griddyn_status)gridDynObjectJacobian(arg1,(double const *)arg2,arg3,arg4,arg5,arg6); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectIoPartialDerivatives(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jlong jarg4, jlong jarg5) { - jint jresult = 0 ; - GridDynObject arg1 = (GridDynObject) 0 ; - double *arg2 = (double *) 0 ; - int arg3 ; - void (*arg4)(int,int,double) = (void (*)(int,int,double)) 0 ; - SolverKey arg5 = (SolverKey) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = *(double **)&jarg2; - arg3 = (int)jarg3; - arg4 = *(void (**)(int,int,double))&jarg4; - arg5 = *(SolverKey *)&jarg5; - result = (griddyn_status)gridDynObjectIoPartialDerivatives(arg1,(double const *)arg2,arg3,arg4,arg5); - jresult = (jint)result; - return jresult; -} - - -SWIGEXPORT jint JNICALL Java_com_java_griddyn_griddynJNI_gridDynObjectOutputPartialDerivatives(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2, jint jarg3, jlong jarg4, jlong jarg5) { - jint jresult = 0 ; - GridDynObject arg1 = (GridDynObject) 0 ; - double *arg2 = (double *) 0 ; - int arg3 ; - void (*arg4)(int,int,double) = (void (*)(int,int,double)) 0 ; - SolverKey arg5 = (SolverKey) 0 ; - griddyn_status result; - - (void)jenv; - (void)jcls; - arg1 = *(GridDynObject *)&jarg1; - arg2 = *(double **)&jarg2; - arg3 = (int)jarg3; - arg4 = *(void (**)(int,int,double))&jarg4; - arg5 = *(SolverKey *)&jarg5; - result = (griddyn_status)gridDynObjectOutputPartialDerivatives(arg1,(double const *)arg2,arg3,arg4,arg5); - jresult = (jint)result; - return jresult; -} - - -#ifdef __cplusplus -} -#endif - diff --git a/interfaces/java/interface/griddyn_status_enum.java b/interfaces/java/interface/griddyn_status_enum.java deleted file mode 100644 index 803004969..000000000 --- a/interfaces/java/interface/griddyn_status_enum.java +++ /dev/null @@ -1,64 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.12 - * - * Do not make changes to this file unless you know what you are doing--modify - * the SWIG interface file instead. - * ----------------------------------------------------------------------------- */ - -package com.java.griddyn; - -public final class griddyn_status_enum { - public final static griddyn_status_enum griddyn_ok = new griddyn_status_enum("griddyn_ok", griddynJNI.griddyn_ok_get()); - public final static griddyn_status_enum griddyn_invalid_object = new griddyn_status_enum("griddyn_invalid_object", griddynJNI.griddyn_invalid_object_get()); - public final static griddyn_status_enum griddyn_invalid_parameter_value = new griddyn_status_enum("griddyn_invalid_parameter_value", griddynJNI.griddyn_invalid_parameter_value_get()); - public final static griddyn_status_enum griddyn_unknown_parameter = new griddyn_status_enum("griddyn_unknown_parameter", griddynJNI.griddyn_unknown_parameter_get()); - public final static griddyn_status_enum griddyn_add_failure = new griddyn_status_enum("griddyn_add_failure", griddynJNI.griddyn_add_failure_get()); - public final static griddyn_status_enum griddyn_remove_failure = new griddyn_status_enum("griddyn_remove_failure", griddynJNI.griddyn_remove_failure_get()); - public final static griddyn_status_enum griddyn_query_load_failure = new griddyn_status_enum("griddyn_query_load_failure", griddynJNI.griddyn_query_load_failure_get()); - public final static griddyn_status_enum griddyn_file_load_failure = new griddyn_status_enum("griddyn_file_load_failure", griddynJNI.griddyn_file_load_failure_get()); - public final static griddyn_status_enum griddyn_solve_error = new griddyn_status_enum("griddyn_solve_error", griddynJNI.griddyn_solve_error_get()); - public final static griddyn_status_enum griddyn_object_not_initialized = new griddyn_status_enum("griddyn_object_not_initialized", griddynJNI.griddyn_object_not_initialized_get()); - public final static griddyn_status_enum griddyn_invalid_function_call = new griddyn_status_enum("griddyn_invalid_function_call", griddynJNI.griddyn_invalid_function_call_get()); - public final static griddyn_status_enum griddyn_function_failure = new griddyn_status_enum("griddyn_function_failure", griddynJNI.griddyn_function_failure_get()); - - public final int swigValue() { - return swigValue; - } - - public String toString() { - return swigName; - } - - public static griddyn_status_enum swigToEnum(int swigValue) { - if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue) - return swigValues[swigValue]; - for (int i = 0; i < swigValues.length; i++) - if (swigValues[i].swigValue == swigValue) - return swigValues[i]; - throw new IllegalArgumentException("No enum " + griddyn_status_enum.class + " with value " + swigValue); - } - - private griddyn_status_enum(String swigName) { - this.swigName = swigName; - this.swigValue = swigNext++; - } - - private griddyn_status_enum(String swigName, int swigValue) { - this.swigName = swigName; - this.swigValue = swigValue; - swigNext = swigValue+1; - } - - private griddyn_status_enum(String swigName, griddyn_status_enum swigEnum) { - this.swigName = swigName; - this.swigValue = swigEnum.swigValue; - swigNext = this.swigValue+1; - } - - private static griddyn_status_enum[] swigValues = { griddyn_ok, griddyn_invalid_object, griddyn_invalid_parameter_value, griddyn_unknown_parameter, griddyn_add_failure, griddyn_remove_failure, griddyn_query_load_failure, griddyn_file_load_failure, griddyn_solve_error, griddyn_object_not_initialized, griddyn_invalid_function_call, griddyn_function_failure }; - private static int swigNext = 0; - private final int swigValue; - private final String swigName; -} - diff --git a/interfaces/matlab/CMakeLists.txt b/interfaces/matlab/CMakeLists.txt deleted file mode 100644 index a46d8024c..000000000 --- a/interfaces/matlab/CMakeLists.txt +++ /dev/null @@ -1,87 +0,0 @@ -# Generate SWIG wrapper (for both MATLAB) - -set(Matlab_FIND_COMPONENTS "MAIN_PROGRAM") -find_package(MATLAB) - -if(NOT DISABLE_SWIG AND SWIG_EXECUTABLE) - - execute_process(COMMAND ${SWIG_EXECUTABLE} -help OUTPUT_VARIABLE SWIG_HELP_OUTPUT) - string(FIND "${SWIG_HELP_OUTPUT}" "-matlab" MATLAB_HELP_FOUND) - if(${MATLAB_HELP_FOUND} LESS 0) - set(MATLAB_SWIG_NOT_AVAILABLE 1) - message(WARNING " SWIG VERSION does not support matlab, reverting to build only") - endif() -endif() - -message(STATUS "Building MATLAB") -if(DISABLE_SWIG OR MATLAB_SWIG_NOT_AVAILABLE) - - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/griddynMEX.cpp - COMMAND "${CMAKE_COMMAND}" -E copy ${CMAKE_CURRENT_SOURCE_DIR}/target/griddynMEX.cpp - ${CMAKE_CURRENT_BINARY_DIR}/griddynMEX.cpp - ) - install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/target/+griddyn DESTINATION matlab - COMPONENT matlab - ) - - file(GLOB MATLAB_FILES ${CMAKE_CURRENT_SOURCE_DIR}/target/*.m) - install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/target/+griddyn DESTINATION matlab - COMPONENT matlab - ) - install(FILES ${MATLAB_FILES} DESTINATION matlab COMPONENT matlab) -else() - - file(GLOB SHARED_LIB_HEADERS ${CMAKE_SOURCE_DIR}/src/shared_library/*.h) - - # custom command for building the wrap file - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/griddynMEX.cpp - COMMAND - "${SWIG_EXECUTABLE}" "-matlab" "-c++" -o "griddynMEX.cpp" - "-I${CMAKE_SOURCE_DIR}/src/griddyn_shared" ${CMAKE_CURRENT_SOURCE_DIR}/griddynMatlab.i - DEPENDS ${CMAKE_SOURCE_DIR}/swig/griddyn.i ${CMAKE_CURRENT_SOURCE_DIR}/griddynMatlab.i - ${SHARED_LIB_HEADERS} - ) - - # ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/griddynMEX.cpp COMMAND ${CMAKE_COMMAND} - # -P ${CMAKE_CURRENT_SOURCE_DIR}/modifyOctSourceFile.cmake DEPENDS - # ${CMAKE_CURRENT_BINARY_DIR}/griddynMEX.cpp ) - - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/+griddyn DESTINATION matlab COMPONENT matlab) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/SwigGet.m ${CMAKE_CURRENT_BINARY_DIR}/SwigMem.m - ${CMAKE_CURRENT_BINARY_DIR}/SwigRef.m DESTINATION matlab COMPONENT matlab - ) - install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/GetFullPath.m DESTINATION matlab COMPONENT matlab) -endif() - -add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mkgriddynMEXFile.m - COMMAND - ${CMAKE_COMMAND} -D LIBRARY_FILE=$ -D - BUILD_FILE=${CMAKE_CURRENT_BINARY_DIR}/griddynMEX.cpp -D - LIBRARY_INCLUDE_LOCATION=${CMAKE_SOURCE_DIR}/src/griddyn_shared/ -D - SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -P - ${CMAKE_CURRENT_SOURCE_DIR}/generateMEXcreationScript.cmake - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/griddynMEX.cpp -) - -add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/griddynMEX.${Matlab_MEX_EXTENSION} - COMMAND ${Matlab_MAIN_PROGRAM} -nojvm -nodesktop -r - "\"run('${CMAKE_CURRENT_BINARY_DIR}/mkgriddynMEXFile.m');quit;\"" - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/mkgriddynMEXFile.m griddyn_shared_lib - ${CMAKE_CURRENT_BINARY_DIR}/griddynMEX.cpp -) - -add_custom_target( - griddynMEX ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/griddynMEX.${Matlab_MEX_EXTENSION} -) - -set_target_properties(griddynMEX PROPERTIES FOLDER interfaces) - -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/griddynMEX.${Matlab_MEX_EXTENSION} DESTINATION matlab - COMPONENT matlab -) -install(FILES $ DESTINATION matlab COMPONENT matlab) -install(FILES ${KEY_LIBRARY_FILES} DESTINATION matlab COMPONENT matlab) diff --git a/interfaces/matlab/CMakeLists.txt.old b/interfaces/matlab/CMakeLists.txt.old deleted file mode 100644 index b2f132264..000000000 --- a/interfaces/matlab/CMakeLists.txt.old +++ /dev/null @@ -1,58 +0,0 @@ -cmake_minimum_required(VERSION 3.4) - -# Find MATLAB -find_package(Matlab REQUIRED) -set(Boost_USE_STATIC_LIBS ON) -find_package(Boost REQUIRED COMPONENTS - date_time filesystem iostreams thread log regex serialization system chrono) - -include_directories(${Matlab_INCLUDE_DIRS}) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/griddyn_shared/) - -# Generate SWIG wrapper (for both MATLAB and Octave) -set(CMAKE_SWIG_OUTDIR ${CMAKE_CURRENT_SOURCE_DIR}/target${MATLABLAG}/extra) -set(CMAKE_SWIG_WRAP_OUTDIR ${CMAKE_CURRENT_SOURCE_DIR}/target${MATLABFLAG}/source/dummy) - -set_source_files_properties(../griddyn.i PROPERTIES CPLUSPLUS ON) -swig_module_initialize(griddynMEX matlab) -swig_add_source_to_module(griddynMEX MEX_FILE ../griddyn.i ../../src/griddyn_shared/griddyn_export.h ../../src/griddyn_shared/griddyn_export_advanced.h) -get_directory_property(swig_extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES) -set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${MEX_FILE}") - -# Install the generated front-end to ${MATLAB_PREFIX} -install(DIRECTORY ${CMAKE_SWIG_OUTDIR}/+griddyn DESTINATION lib/matlab) -install(FILES ${CMAKE_SWIG_OUTDIR}/SwigGet.m - ${CMAKE_SWIG_OUTDIR}/SwigMem.m - ${CMAKE_SWIG_OUTDIR}/SwigRef.m - DESTINATION lib/matlab - ) - -# create module directory -set(MODULE ${CMAKE_CURRENT_BINARY_DIR}/griddyn) - -file(MAKE_DIRECTORY ${MODULE}) - -# Install the generated front-end to lib/matlab -add_custom_target(matlab DEPENDS griddynMATLAB) - -message("matlab include dir: ${Matlab_INCLUDE_DIRS}") -message("MEX_FILE: ${MEX_FILE}") -message("Matlab MEX Library: ${Matlab_MEX_LIBRARY}") -message("Boost LIBRARY DIRS: ${Boost_LIBRARY_DIRS}") -message("Boost LIBRARIES: ${Boost_LIBRARIES}") - -# Compile MEX file -if (EXISTS ${Matlab_INCLUDE_DIRS}/../version/cpp_mexapi_version.cpp) - add_library(griddynMATLAB MODULE ${MEX_FILE} ${Matlab_INCLUDE_DIRS}/../version/cpp_mexapi_version.cpp) -else() - add_library(griddynMATLAB MODULE ${MEX_FILE}) -endif() -target_include_directories(griddynMATLAB PUBLIC ${Matlab_INCLUDE_DIRS}) -target_link_libraries(griddynMATLAB griddyn_shared_lib ${Boost_LIBRARIES} ${Matlab_MEX_LIBRARY} ) -set_target_properties(griddynMATLAB - PROPERTIES OUTPUT_NAME "griddynMEX" - PREFIX "" - SUFFIX .${Matlab_MEX_EXTENSION} - ) -install(TARGETS griddynMATLAB DESTINATION lib/matlab) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/griddynMEX.mexa64 DESTINATION lib/matlab ) diff --git a/interfaces/matlab/README.md b/interfaces/matlab/README.md deleted file mode 100644 index 689c71831..000000000 --- a/interfaces/matlab/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# griddynMEX - -## Prerequisites - -- Install [SWIG with MATLAB](https://github.com/jaeandersson/swig/) -- `./configure --prefix=/Users/$USER/local/swig_install; make; make install;` -- Ensure that SWIG and MATLAB are in the PATH - -## Building GRIDDYN with matlab extension - -GRIDDYN can be build with the matlab extension by enabling the BUILD_MATLAB_EXTENSION option in cmake -GRIDDYN will also need to know the location of swig with MATLAB that was built. - -It can also be built without that version of swig using existing files in the repo, but this will not work if there are any library changes -after installing the mex file will be placed in the matlab folder of the install directory diff --git a/interfaces/matlab/export.txt b/interfaces/matlab/export.txt deleted file mode 100644 index 4d556e8ed..000000000 --- a/interfaces/matlab/export.txt +++ /dev/null @@ -1,4 +0,0 @@ -{ - global: *; - local: *boost*; -}; diff --git a/interfaces/matlab/generateMEXcreationScript.cmake b/interfaces/matlab/generateMEXcreationScript.cmake deleted file mode 100644 index 85a5dcb93..000000000 --- a/interfaces/matlab/generateMEXcreationScript.cmake +++ /dev/null @@ -1,5 +0,0 @@ -get_filename_component(LIBRARY_BUILD_LOCATION ${LIBRARY_FILE} DIRECTORY) -get_filename_component(LIBRARY_NAME ${LIBRARY_FILE} NAME_WE) - -get_filename_component(BUILD_DIR ${BUILD_FILE} DIRECTORY) -configure_file(${SOURCE_DIR}/mkgriddynMEXFile.m.in ${BUILD_DIR}/mkgriddynMEXFile.m) diff --git a/interfaces/matlab/griddynMatlab.i b/interfaces/matlab/griddynMatlab.i deleted file mode 100644 index 394ffab1c..000000000 --- a/interfaces/matlab/griddynMatlab.i +++ /dev/null @@ -1,2 +0,0 @@ -#%include "cstring.i" -%include "../griddyn.i" diff --git a/interfaces/matlab/matlabDyn.yaml b/interfaces/matlab/matlabDyn.yaml deleted file mode 100644 index 9ee9d5dad..000000000 --- a/interfaces/matlab/matlabDyn.yaml +++ /dev/null @@ -1,84 +0,0 @@ -name: matlabDyn -channels: - - salford_systems - #- software/anaconda2/conda-bld/broken - #- nadeau1 - #- local - - juanlu001 - - conda-forge - - defaults -dependencies: - - ampl-mp=3.1.0=0 - - autopep8=1.3.3=py_0 - - backports=1.0=py27_1 - - backports.shutil_get_terminal_size=1.0.0=py_3 - - blas=1.1=openblas - - bzip2=1.0.6=1 - - certifi=2017.7.27.1=py27_0 - - cmake=3.9.3=0 - - conda-forge-build-setup=4.4.13=0 - - curl=7.54.1=0 - - decorator=4.1.2=py27_0 - - enum34=1.1.6=py27_1 - - expat=2.2.1=0 - - fmilib=2.0.2=0 - - git=2.14.2=0 - - icu=58.1=1 - - ipython=5.5.0=py27_0 - - ipython_genutils=0.2.0=py27_0 - - krb5=1.14.2=0 - - libiconv=1.14=4 - - libssh2=1.8.0=1 - - libuv=1.11.0=0 - - llvmdev=4.0.0=default_0 - - metis=5.1.0=3 - - mpich=3.2=5 - - ncurses=5.9=10 - - numpy=1.13.3=py27_blas_openblas_200 - - openblas=0.2.19=2 - - pathlib2=2.3.0=py27_0 - - pcre=8.39=0 - - pexpect=4.2.1=py27_0 - - pickleshare=0.7.4=py27_0 - - prompt_toolkit=1.0.15=py27_0 - - pthread-stubs=0.3=1 - - ptscotch=6.0.4=4 - - ptyprocess=0.5.2=py27_0 - - pycodestyle=2.3.1=py27_0 - - pygments=2.2.0=py27_0 - - rhash=1.3.4=0 - - scalapack=2.0.2=0 - - scandir=1.6=py27_0 - - scotch=6.0.4=3 - - setuptools=36.6.0=py27_1 - - simplegeneric=0.8.1=py27_0 - - six=1.11.0=py27_1 - - suitesparse=4.5.4=blas_openblas_200 - - sundials=2.7.0=blas_openblas_3 - - swig=3.0.12=2 - - tbb=2018_20170919=0 - - traitlets=4.3.2=py27_0 - - wcwidth=0.1.7=py27_0 - - xz=5.2.3=0 - - zlib=1.2.8=3 - - cloog=0.18.0=0 - - gmp=6.1.0=0 - - libgcc=7.2.0=h69d50b8_2 - - libgcc-ng=7.2.0=h7cc24e2_2 - - libgfortran=3.0.0=1 - - libstdcxx-ng=7.2.0=h7a57d05_2 - - mkl=2017.0.3=0 - - mpc=1.0.3=0 - - mpfr=3.1.5=0 - - mpich2=1.4.1p1=0 - - openssl=1.0.2l=0 - - readline=6.2=2 - - sqlite=3.13.0=0 - - system=5.8=2 - - tk=8.5.18=0 - - ipopt_bin=3.7.1=1 - #- mumps=5.0.2=blas_openblash0249860_203 - - gcc-6=6.1.0=0 - - isl=0.15=0 - - python=2.7.14 -prefix: /software/anaconda2/envs/gridDyn diff --git a/interfaces/matlab/mkgriddynMEXFile.m.in b/interfaces/matlab/mkgriddynMEXFile.m.in deleted file mode 100644 index 5e83e7577..000000000 --- a/interfaces/matlab/mkgriddynMEXFile.m.in +++ /dev/null @@ -1 +0,0 @@ -mex('-I${LIBRARY_INCLUDE_LOCATION}', '-L${LIBRARY_BUILD_LOCATION}','-l${LIBRARY_NAME}', '-largeArrayDims','${BUILD_FILE}') diff --git a/interfaces/matlab/target/+griddyn/GRIDDYN_COMPLETE.m b/interfaces/matlab/target/+griddyn/GRIDDYN_COMPLETE.m deleted file mode 100644 index 33c1a1c18..000000000 --- a/interfaces/matlab/target/+griddyn/GRIDDYN_COMPLETE.m +++ /dev/null @@ -1,7 +0,0 @@ -function v = GRIDDYN_COMPLETE() - persistent vInitialized; - if isempty(vInitialized) - vInitialized = griddynMEX(0, 13); - end - v = vInitialized; -end diff --git a/interfaces/matlab/target/+griddyn/GRIDDYN_PENDING.m b/interfaces/matlab/target/+griddyn/GRIDDYN_PENDING.m deleted file mode 100644 index 421d578a0..000000000 --- a/interfaces/matlab/target/+griddyn/GRIDDYN_PENDING.m +++ /dev/null @@ -1,7 +0,0 @@ -function v = GRIDDYN_PENDING() - persistent vInitialized; - if isempty(vInitialized) - vInitialized = griddynMEX(0, 12); - end - v = vInitialized; -end diff --git a/interfaces/matlab/target/+griddyn/charp_assign.m b/interfaces/matlab/target/+griddyn/charp_assign.m deleted file mode 100644 index fae955b26..000000000 --- a/interfaces/matlab/target/+griddyn/charp_assign.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = charp_assign(varargin) - [varargout{1:nargout}] = griddynMEX(13, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/charp_value.m b/interfaces/matlab/target/+griddyn/charp_value.m deleted file mode 100644 index b20d3ae2f..000000000 --- a/interfaces/matlab/target/+griddyn/charp_value.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = charp_value(varargin) - [varargout{1:nargout}] = griddynMEX(14, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/copy_charp.m b/interfaces/matlab/target/+griddyn/copy_charp.m deleted file mode 100644 index 676e966f8..000000000 --- a/interfaces/matlab/target/+griddyn/copy_charp.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = copy_charp(varargin) - [varargout{1:nargout}] = griddynMEX(11, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/copy_doublep.m b/interfaces/matlab/target/+griddyn/copy_doublep.m deleted file mode 100644 index 7ee5adbc7..000000000 --- a/interfaces/matlab/target/+griddyn/copy_doublep.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = copy_doublep(varargin) - [varargout{1:nargout}] = griddynMEX(6, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/delete_charp.m b/interfaces/matlab/target/+griddyn/delete_charp.m deleted file mode 100644 index 2587061da..000000000 --- a/interfaces/matlab/target/+griddyn/delete_charp.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = delete_charp(varargin) - [varargout{1:nargout}] = griddynMEX(12, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/delete_doublep.m b/interfaces/matlab/target/+griddyn/delete_doublep.m deleted file mode 100644 index 91601138b..000000000 --- a/interfaces/matlab/target/+griddyn/delete_doublep.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = delete_doublep(varargin) - [varargout{1:nargout}] = griddynMEX(7, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/doubleArray.m b/interfaces/matlab/target/+griddyn/doubleArray.m deleted file mode 100644 index 18d06d150..000000000 --- a/interfaces/matlab/target/+griddyn/doubleArray.m +++ /dev/null @@ -1,38 +0,0 @@ -classdef doubleArray < SwigRef - methods - function this = swig_this(self) - this = griddynMEX(3, self); - end - function self = doubleArray(varargin) - if nargin==1 && strcmp(class(varargin{1}),'SwigRef') - if ~isnull(varargin{1}) - self.swigPtr = varargin{1}.swigPtr; - end - else - tmp = griddynMEX(15, varargin{:}); - self.swigPtr = tmp.swigPtr; - tmp.swigPtr = []; - end - end - function delete(self) - if self.swigPtr - griddynMEX(16, self); - self.swigPtr=[]; - end - end - function varargout = paren(self,varargin) - [varargout{1:nargout}] = griddynMEX(17, self, varargin{:}); - end - function varargout = paren_asgn(self,varargin) - [varargout{1:nargout}] = griddynMEX(18, self, varargin{:}); - end - function varargout = cast(self,varargin) - [varargout{1:nargout}] = griddynMEX(19, self, varargin{:}); - end - end - methods(Static) - function varargout = frompointer(varargin) - [varargout{1:nargout}] = griddynMEX(20, varargin{:}); - end - end -end diff --git a/interfaces/matlab/target/+griddyn/doublep_assign.m b/interfaces/matlab/target/+griddyn/doublep_assign.m deleted file mode 100644 index 78369c4ae..000000000 --- a/interfaces/matlab/target/+griddyn/doublep_assign.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = doublep_assign(varargin) - [varargout{1:nargout}] = griddynMEX(8, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/doublep_value.m b/interfaces/matlab/target/+griddyn/doublep_value.m deleted file mode 100644 index b9e5db077..000000000 --- a/interfaces/matlab/target/+griddyn/doublep_value.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = doublep_value(varargin) - [varargout{1:nargout}] = griddynMEX(9, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/getSimulationObject.m b/interfaces/matlab/target/+griddyn/getSimulationObject.m deleted file mode 100644 index 7bc597206..000000000 --- a/interfaces/matlab/target/+griddyn/getSimulationObject.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = getSimulationObject(varargin) - [varargout{1:nargout}] = griddynMEX(57, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynEventCreate.m b/interfaces/matlab/target/+griddyn/gridDynEventCreate.m deleted file mode 100644 index 05fce56f5..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynEventCreate.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynEventCreate(varargin) - [varargout{1:nargout}] = griddynMEX(80, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynEventFree.m b/interfaces/matlab/target/+griddyn/gridDynEventFree.m deleted file mode 100644 index 110e6238f..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynEventFree.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynEventFree(varargin) - [varargout{1:nargout}] = griddynMEX(81, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynEventSchedule.m b/interfaces/matlab/target/+griddyn/gridDynEventSchedule.m deleted file mode 100644 index 87c3ab3b3..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynEventSchedule.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynEventSchedule(varargin) - [varargout{1:nargout}] = griddynMEX(83, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynEventSetFlag.m b/interfaces/matlab/target/+griddyn/gridDynEventSetFlag.m deleted file mode 100644 index d72e6af63..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynEventSetFlag.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynEventSetFlag(varargin) - [varargout{1:nargout}] = griddynMEX(86, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynEventSetString.m b/interfaces/matlab/target/+griddyn/gridDynEventSetString.m deleted file mode 100644 index cc3467f7d..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynEventSetString.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynEventSetString(varargin) - [varargout{1:nargout}] = griddynMEX(85, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynEventSetTarget.m b/interfaces/matlab/target/+griddyn/gridDynEventSetTarget.m deleted file mode 100644 index a902f11df..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynEventSetTarget.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynEventSetTarget(varargin) - [varargout{1:nargout}] = griddynMEX(87, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynEventSetValue.m b/interfaces/matlab/target/+griddyn/gridDynEventSetValue.m deleted file mode 100644 index 019d45023..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynEventSetValue.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynEventSetValue(varargin) - [varargout{1:nargout}] = griddynMEX(84, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynEventTrigger.m b/interfaces/matlab/target/+griddyn/gridDynEventTrigger.m deleted file mode 100644 index 346c3081b..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynEventTrigger.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynEventTrigger(varargin) - [varargout{1:nargout}] = griddynMEX(82, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectAdd.m b/interfaces/matlab/target/+griddyn/gridDynObjectAdd.m deleted file mode 100644 index de68cbcb8..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectAdd.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectAdd(varargin) - [varargout{1:nargout}] = griddynMEX(24, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectAlgebraicUpdate.m b/interfaces/matlab/target/+griddyn/gridDynObjectAlgebraicUpdate.m deleted file mode 100644 index bd8407781..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectAlgebraicUpdate.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectAlgebraicUpdate(varargin) - [varargout{1:nargout}] = griddynMEX(94, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectClone.m b/interfaces/matlab/target/+griddyn/gridDynObjectClone.m deleted file mode 100644 index 042c3ff3b..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectClone.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectClone(varargin) - [varargout{1:nargout}] = griddynMEX(22, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectCreate.m b/interfaces/matlab/target/+griddyn/gridDynObjectCreate.m deleted file mode 100644 index 83395d612..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectCreate.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectCreate(varargin) - [varargout{1:nargout}] = griddynMEX(21, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectDerivative.m b/interfaces/matlab/target/+griddyn/gridDynObjectDerivative.m deleted file mode 100644 index 75b1d14ca..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectDerivative.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectDerivative(varargin) - [varargout{1:nargout}] = griddynMEX(93, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectFind.m b/interfaces/matlab/target/+griddyn/gridDynObjectFind.m deleted file mode 100644 index 853bb4200..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectFind.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectFind(varargin) - [varargout{1:nargout}] = griddynMEX(34, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectFindByUserId.m b/interfaces/matlab/target/+griddyn/gridDynObjectFindByUserId.m deleted file mode 100644 index 6bfcfabfa..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectFindByUserId.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectFindByUserId(varargin) - [varargout{1:nargout}] = griddynMEX(36, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectFree.m b/interfaces/matlab/target/+griddyn/gridDynObjectFree.m deleted file mode 100644 index 17121674f..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectFree.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectFree(varargin) - [varargout{1:nargout}] = griddynMEX(23, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectGetFlag.m b/interfaces/matlab/target/+griddyn/gridDynObjectGetFlag.m deleted file mode 100644 index c609c8718..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectGetFlag.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectGetFlag(varargin) - [varargout{1:nargout}] = griddynMEX(33, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectGetParent.m b/interfaces/matlab/target/+griddyn/gridDynObjectGetParent.m deleted file mode 100644 index cd20d250a..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectGetParent.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectGetParent(varargin) - [varargout{1:nargout}] = griddynMEX(37, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectGetStateVariableTypes.m b/interfaces/matlab/target/+griddyn/gridDynObjectGetStateVariableTypes.m deleted file mode 100644 index 03854191e..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectGetStateVariableTypes.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectGetStateVariableTypes(varargin) - [varargout{1:nargout}] = griddynMEX(91, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectGetString.m b/interfaces/matlab/target/+griddyn/gridDynObjectGetString.m deleted file mode 100644 index 7b15c21a6..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectGetString.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectGetString(varargin) - [varargout{1:nargout}] = griddynMEX(30, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectGetSubObject.m b/interfaces/matlab/target/+griddyn/gridDynObjectGetSubObject.m deleted file mode 100644 index 0c3e3ad67..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectGetSubObject.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectGetSubObject(varargin) - [varargout{1:nargout}] = griddynMEX(35, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectGetType.m b/interfaces/matlab/target/+griddyn/gridDynObjectGetType.m deleted file mode 100644 index 9dc2407e6..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectGetType.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectGetType(varargin) - [varargout{1:nargout}] = griddynMEX(38, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectGetValue.m b/interfaces/matlab/target/+griddyn/gridDynObjectGetValue.m deleted file mode 100644 index 2d1412fd3..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectGetValue.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectGetValue(varargin) - [varargout{1:nargout}] = griddynMEX(31, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectGetValueUnits.m b/interfaces/matlab/target/+griddyn/gridDynObjectGetValueUnits.m deleted file mode 100644 index 005174a10..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectGetValueUnits.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectGetValueUnits(varargin) - [varargout{1:nargout}] = griddynMEX(32, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectGuessState.m b/interfaces/matlab/target/+griddyn/gridDynObjectGuessState.m deleted file mode 100644 index cca75cb16..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectGuessState.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectGuessState(varargin) - [varargout{1:nargout}] = griddynMEX(89, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectIoPartialDerivatives.m b/interfaces/matlab/target/+griddyn/gridDynObjectIoPartialDerivatives.m deleted file mode 100644 index 0e19f3531..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectIoPartialDerivatives.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectIoPartialDerivatives(varargin) - [varargout{1:nargout}] = griddynMEX(96, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectJacobian.m b/interfaces/matlab/target/+griddyn/gridDynObjectJacobian.m deleted file mode 100644 index 7248e41e2..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectJacobian.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectJacobian(varargin) - [varargout{1:nargout}] = griddynMEX(95, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectOutputPartialDerivatives.m b/interfaces/matlab/target/+griddyn/gridDynObjectOutputPartialDerivatives.m deleted file mode 100644 index fa4028cb8..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectOutputPartialDerivatives.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectOutputPartialDerivatives(varargin) - [varargout{1:nargout}] = griddynMEX(97, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectRemove.m b/interfaces/matlab/target/+griddyn/gridDynObjectRemove.m deleted file mode 100644 index b6fbdc95f..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectRemove.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectRemove(varargin) - [varargout{1:nargout}] = griddynMEX(25, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectResidual.m b/interfaces/matlab/target/+griddyn/gridDynObjectResidual.m deleted file mode 100644 index b6eaa2522..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectResidual.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectResidual(varargin) - [varargout{1:nargout}] = griddynMEX(92, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectSetFlag.m b/interfaces/matlab/target/+griddyn/gridDynObjectSetFlag.m deleted file mode 100644 index 1447245ff..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectSetFlag.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectSetFlag(varargin) - [varargout{1:nargout}] = griddynMEX(29, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectSetState.m b/interfaces/matlab/target/+griddyn/gridDynObjectSetState.m deleted file mode 100644 index b26d804bc..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectSetState.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectSetState(varargin) - [varargout{1:nargout}] = griddynMEX(90, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectSetString.m b/interfaces/matlab/target/+griddyn/gridDynObjectSetString.m deleted file mode 100644 index 142fee0c7..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectSetString.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectSetString(varargin) - [varargout{1:nargout}] = griddynMEX(26, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectSetValue.m b/interfaces/matlab/target/+griddyn/gridDynObjectSetValue.m deleted file mode 100644 index 358ee5c7a..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectSetValue.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectSetValue(varargin) - [varargout{1:nargout}] = griddynMEX(27, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectSetValueUnits.m b/interfaces/matlab/target/+griddyn/gridDynObjectSetValueUnits.m deleted file mode 100644 index 3383c1903..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectSetValueUnits.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectSetValueUnits(varargin) - [varargout{1:nargout}] = griddynMEX(28, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynObjectStateSize.m b/interfaces/matlab/target/+griddyn/gridDynObjectStateSize.m deleted file mode 100644 index 72e879bff..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynObjectStateSize.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynObjectStateSize(varargin) - [varargout{1:nargout}] = griddynMEX(88, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationAddCommand.m b/interfaces/matlab/target/+griddyn/gridDynSimulationAddCommand.m deleted file mode 100644 index c0aa23ac4..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationAddCommand.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationAddCommand(varargin) - [varargout{1:nargout}] = griddynMEX(44, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationAlgebraicUpdate.m b/interfaces/matlab/target/+griddyn/gridDynSimulationAlgebraicUpdate.m deleted file mode 100644 index 257b78ae1..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationAlgebraicUpdate.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationAlgebraicUpdate(varargin) - [varargout{1:nargout}] = griddynMEX(69, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationBusCount.m b/interfaces/matlab/target/+griddyn/gridDynSimulationBusCount.m deleted file mode 100644 index f76e4c29e..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationBusCount.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationBusCount(varargin) - [varargout{1:nargout}] = griddynMEX(61, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationCreate.m b/interfaces/matlab/target/+griddyn/gridDynSimulationCreate.m deleted file mode 100644 index 4a5301b77..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationCreate.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationCreate(varargin) - [varargout{1:nargout}] = griddynMEX(39, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationDerivative.m b/interfaces/matlab/target/+griddyn/gridDynSimulationDerivative.m deleted file mode 100644 index 1fa457997..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationDerivative.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationDerivative(varargin) - [varargout{1:nargout}] = griddynMEX(68, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationDynamicInitialize.m b/interfaces/matlab/target/+griddyn/gridDynSimulationDynamicInitialize.m deleted file mode 100644 index 1cb5187f5..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationDynamicInitialize.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationDynamicInitialize(varargin) - [varargout{1:nargout}] = griddynMEX(47, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationFree.m b/interfaces/matlab/target/+griddyn/gridDynSimulationFree.m deleted file mode 100644 index 7160bbbb6..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationFree.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationFree(varargin) - [varargout{1:nargout}] = griddynMEX(40, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationGetCurrentTime.m b/interfaces/matlab/target/+griddyn/gridDynSimulationGetCurrentTime.m deleted file mode 100644 index 3b17c70a4..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationGetCurrentTime.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationGetCurrentTime(varargin) - [varargout{1:nargout}] = griddynMEX(49, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationGetResults.m b/interfaces/matlab/target/+griddyn/gridDynSimulationGetResults.m deleted file mode 100644 index aa98f5d2b..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationGetResults.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationGetResults(varargin) - [varargout{1:nargout}] = griddynMEX(63, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationGetSolverKey.m b/interfaces/matlab/target/+griddyn/gridDynSimulationGetSolverKey.m deleted file mode 100644 index 89ac3fc0f..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationGetSolverKey.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationGetSolverKey(varargin) - [varargout{1:nargout}] = griddynMEX(58, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationGetStateVariableTypes.m b/interfaces/matlab/target/+griddyn/gridDynSimulationGetStateVariableTypes.m deleted file mode 100644 index 70bae160d..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationGetStateVariableTypes.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationGetStateVariableTypes(varargin) - [varargout{1:nargout}] = griddynMEX(66, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationGetStatus.m b/interfaces/matlab/target/+griddyn/gridDynSimulationGetStatus.m deleted file mode 100644 index 768ff4447..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationGetStatus.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationGetStatus(varargin) - [varargout{1:nargout}] = griddynMEX(56, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationGuessState.m b/interfaces/matlab/target/+griddyn/gridDynSimulationGuessState.m deleted file mode 100644 index 4470814a7..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationGuessState.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationGuessState(varargin) - [varargout{1:nargout}] = griddynMEX(64, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationInitializeFromArgs.m b/interfaces/matlab/target/+griddyn/gridDynSimulationInitializeFromArgs.m deleted file mode 100644 index b41dddf5f..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationInitializeFromArgs.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationInitializeFromArgs(varargin) - [varargout{1:nargout}] = griddynMEX(42, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationInitializeFromString.m b/interfaces/matlab/target/+griddyn/gridDynSimulationInitializeFromString.m deleted file mode 100644 index c63070777..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationInitializeFromString.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationInitializeFromString(varargin) - [varargout{1:nargout}] = griddynMEX(41, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationJacobian.m b/interfaces/matlab/target/+griddyn/gridDynSimulationJacobian.m deleted file mode 100644 index 3a1c2cbd1..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationJacobian.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationJacobian(varargin) - [varargout{1:nargout}] = griddynMEX(70, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationLineCount.m b/interfaces/matlab/target/+griddyn/gridDynSimulationLineCount.m deleted file mode 100644 index 1f611487a..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationLineCount.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationLineCount(varargin) - [varargout{1:nargout}] = griddynMEX(62, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationLoadfile.m b/interfaces/matlab/target/+griddyn/gridDynSimulationLoadfile.m deleted file mode 100644 index f31c3de3d..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationLoadfile.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationLoadfile(varargin) - [varargout{1:nargout}] = griddynMEX(43, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationPowerflow.m b/interfaces/matlab/target/+griddyn/gridDynSimulationPowerflow.m deleted file mode 100644 index b14890d3f..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationPowerflow.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationPowerflow(varargin) - [varargout{1:nargout}] = griddynMEX(46, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationPowerflowInitialize.m b/interfaces/matlab/target/+griddyn/gridDynSimulationPowerflowInitialize.m deleted file mode 100644 index 161473541..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationPowerflowInitialize.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationPowerflowInitialize(varargin) - [varargout{1:nargout}] = griddynMEX(45, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationReset.m b/interfaces/matlab/target/+griddyn/gridDynSimulationReset.m deleted file mode 100644 index 0f170c555..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationReset.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationReset(varargin) - [varargout{1:nargout}] = griddynMEX(48, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationResidual.m b/interfaces/matlab/target/+griddyn/gridDynSimulationResidual.m deleted file mode 100644 index aecc1cba8..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationResidual.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationResidual(varargin) - [varargout{1:nargout}] = griddynMEX(67, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationRun.m b/interfaces/matlab/target/+griddyn/gridDynSimulationRun.m deleted file mode 100644 index e61c331a2..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationRun.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationRun(varargin) - [varargout{1:nargout}] = griddynMEX(50, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationRunAsync.m b/interfaces/matlab/target/+griddyn/gridDynSimulationRunAsync.m deleted file mode 100644 index 9db826c11..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationRunAsync.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationRunAsync(varargin) - [varargout{1:nargout}] = griddynMEX(53, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationRunTo.m b/interfaces/matlab/target/+griddyn/gridDynSimulationRunTo.m deleted file mode 100644 index e1ab89010..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationRunTo.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationRunTo(varargin) - [varargout{1:nargout}] = griddynMEX(51, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationRunToAsync.m b/interfaces/matlab/target/+griddyn/gridDynSimulationRunToAsync.m deleted file mode 100644 index 5f427c9f1..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationRunToAsync.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationRunToAsync(varargin) - [varargout{1:nargout}] = griddynMEX(54, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationSetState.m b/interfaces/matlab/target/+griddyn/gridDynSimulationSetState.m deleted file mode 100644 index bcdcf7aae..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationSetState.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationSetState(varargin) - [varargout{1:nargout}] = griddynMEX(65, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationStateSize.m b/interfaces/matlab/target/+griddyn/gridDynSimulationStateSize.m deleted file mode 100644 index 5036328d0..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationStateSize.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationStateSize(varargin) - [varargout{1:nargout}] = griddynMEX(60, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationStep.m b/interfaces/matlab/target/+griddyn/gridDynSimulationStep.m deleted file mode 100644 index 4164e65fa..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationStep.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationStep(varargin) - [varargout{1:nargout}] = griddynMEX(52, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSimulationStepAsync.m b/interfaces/matlab/target/+griddyn/gridDynSimulationStepAsync.m deleted file mode 100644 index 39b3d7373..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSimulationStepAsync.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSimulationStepAsync(varargin) - [varargout{1:nargout}] = griddynMEX(55, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSingleQueryCreate.m b/interfaces/matlab/target/+griddyn/gridDynSingleQueryCreate.m deleted file mode 100644 index e26fbfcca..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSingleQueryCreate.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSingleQueryCreate(varargin) - [varargout{1:nargout}] = griddynMEX(71, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSingleQueryFree.m b/interfaces/matlab/target/+griddyn/gridDynSingleQueryFree.m deleted file mode 100644 index 0fd193380..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSingleQueryFree.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSingleQueryFree(varargin) - [varargout{1:nargout}] = griddynMEX(73, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSingleQueryRun.m b/interfaces/matlab/target/+griddyn/gridDynSingleQueryRun.m deleted file mode 100644 index 719b2ae34..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSingleQueryRun.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSingleQueryRun(varargin) - [varargout{1:nargout}] = griddynMEX(75, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSingleQueryUpdate.m b/interfaces/matlab/target/+griddyn/gridDynSingleQueryUpdate.m deleted file mode 100644 index 4b624425d..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSingleQueryUpdate.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSingleQueryUpdate(varargin) - [varargout{1:nargout}] = griddynMEX(78, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynSolverKeyFree.m b/interfaces/matlab/target/+griddyn/gridDynSolverKeyFree.m deleted file mode 100644 index 5fc7e15dd..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynSolverKeyFree.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynSolverKeyFree(varargin) - [varargout{1:nargout}] = griddynMEX(59, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynVectorQueryAppend.m b/interfaces/matlab/target/+griddyn/gridDynVectorQueryAppend.m deleted file mode 100644 index 67565bc86..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynVectorQueryAppend.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynVectorQueryAppend(varargin) - [varargout{1:nargout}] = griddynMEX(77, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynVectorQueryCreate.m b/interfaces/matlab/target/+griddyn/gridDynVectorQueryCreate.m deleted file mode 100644 index 3aa8b2edb..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynVectorQueryCreate.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynVectorQueryCreate(varargin) - [varargout{1:nargout}] = griddynMEX(72, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynVectorQueryFree.m b/interfaces/matlab/target/+griddyn/gridDynVectorQueryFree.m deleted file mode 100644 index 85fcb292a..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynVectorQueryFree.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynVectorQueryFree(varargin) - [varargout{1:nargout}] = griddynMEX(74, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynVectorQueryRun.m b/interfaces/matlab/target/+griddyn/gridDynVectorQueryRun.m deleted file mode 100644 index de6f30a2e..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynVectorQueryRun.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynVectorQueryRun(varargin) - [varargout{1:nargout}] = griddynMEX(76, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/gridDynVectorQueryUpdate.m b/interfaces/matlab/target/+griddyn/gridDynVectorQueryUpdate.m deleted file mode 100644 index d8e364798..000000000 --- a/interfaces/matlab/target/+griddyn/gridDynVectorQueryUpdate.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = gridDynVectorQueryUpdate(varargin) - [varargout{1:nargout}] = griddynMEX(79, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/griddyn_add_failure.m b/interfaces/matlab/target/+griddyn/griddyn_add_failure.m deleted file mode 100644 index b6b18f7d8..000000000 --- a/interfaces/matlab/target/+griddyn/griddyn_add_failure.m +++ /dev/null @@ -1,7 +0,0 @@ -function v = griddyn_add_failure() - persistent vInitialized; - if isempty(vInitialized) - vInitialized = griddynMEX(0, 4); - end - v = vInitialized; -end diff --git a/interfaces/matlab/target/+griddyn/griddyn_file_load_failure.m b/interfaces/matlab/target/+griddyn/griddyn_file_load_failure.m deleted file mode 100644 index 517c07cd4..000000000 --- a/interfaces/matlab/target/+griddyn/griddyn_file_load_failure.m +++ /dev/null @@ -1,7 +0,0 @@ -function v = griddyn_file_load_failure() - persistent vInitialized; - if isempty(vInitialized) - vInitialized = griddynMEX(0, 7); - end - v = vInitialized; -end diff --git a/interfaces/matlab/target/+griddyn/griddyn_function_failure.m b/interfaces/matlab/target/+griddyn/griddyn_function_failure.m deleted file mode 100644 index 06e90ea86..000000000 --- a/interfaces/matlab/target/+griddyn/griddyn_function_failure.m +++ /dev/null @@ -1,7 +0,0 @@ -function v = griddyn_function_failure() - persistent vInitialized; - if isempty(vInitialized) - vInitialized = griddynMEX(0, 11); - end - v = vInitialized; -end diff --git a/interfaces/matlab/target/+griddyn/griddyn_invalid_function_call.m b/interfaces/matlab/target/+griddyn/griddyn_invalid_function_call.m deleted file mode 100644 index ed286198f..000000000 --- a/interfaces/matlab/target/+griddyn/griddyn_invalid_function_call.m +++ /dev/null @@ -1,7 +0,0 @@ -function v = griddyn_invalid_function_call() - persistent vInitialized; - if isempty(vInitialized) - vInitialized = griddynMEX(0, 10); - end - v = vInitialized; -end diff --git a/interfaces/matlab/target/+griddyn/griddyn_invalid_object.m b/interfaces/matlab/target/+griddyn/griddyn_invalid_object.m deleted file mode 100644 index 0f91ac417..000000000 --- a/interfaces/matlab/target/+griddyn/griddyn_invalid_object.m +++ /dev/null @@ -1,7 +0,0 @@ -function v = griddyn_invalid_object() - persistent vInitialized; - if isempty(vInitialized) - vInitialized = griddynMEX(0, 1); - end - v = vInitialized; -end diff --git a/interfaces/matlab/target/+griddyn/griddyn_invalid_parameter_value.m b/interfaces/matlab/target/+griddyn/griddyn_invalid_parameter_value.m deleted file mode 100644 index ab3e02e06..000000000 --- a/interfaces/matlab/target/+griddyn/griddyn_invalid_parameter_value.m +++ /dev/null @@ -1,7 +0,0 @@ -function v = griddyn_invalid_parameter_value() - persistent vInitialized; - if isempty(vInitialized) - vInitialized = griddynMEX(0, 2); - end - v = vInitialized; -end diff --git a/interfaces/matlab/target/+griddyn/griddyn_object_not_initialized.m b/interfaces/matlab/target/+griddyn/griddyn_object_not_initialized.m deleted file mode 100644 index f1645787c..000000000 --- a/interfaces/matlab/target/+griddyn/griddyn_object_not_initialized.m +++ /dev/null @@ -1,7 +0,0 @@ -function v = griddyn_object_not_initialized() - persistent vInitialized; - if isempty(vInitialized) - vInitialized = griddynMEX(0, 9); - end - v = vInitialized; -end diff --git a/interfaces/matlab/target/+griddyn/griddyn_ok.m b/interfaces/matlab/target/+griddyn/griddyn_ok.m deleted file mode 100644 index 29594e947..000000000 --- a/interfaces/matlab/target/+griddyn/griddyn_ok.m +++ /dev/null @@ -1,7 +0,0 @@ -function v = griddyn_ok() - persistent vInitialized; - if isempty(vInitialized) - vInitialized = griddynMEX(0, 0); - end - v = vInitialized; -end diff --git a/interfaces/matlab/target/+griddyn/griddyn_query_load_failure.m b/interfaces/matlab/target/+griddyn/griddyn_query_load_failure.m deleted file mode 100644 index 88ea60303..000000000 --- a/interfaces/matlab/target/+griddyn/griddyn_query_load_failure.m +++ /dev/null @@ -1,7 +0,0 @@ -function v = griddyn_query_load_failure() - persistent vInitialized; - if isempty(vInitialized) - vInitialized = griddynMEX(0, 6); - end - v = vInitialized; -end diff --git a/interfaces/matlab/target/+griddyn/griddyn_remove_failure.m b/interfaces/matlab/target/+griddyn/griddyn_remove_failure.m deleted file mode 100644 index 798e4c8b3..000000000 --- a/interfaces/matlab/target/+griddyn/griddyn_remove_failure.m +++ /dev/null @@ -1,7 +0,0 @@ -function v = griddyn_remove_failure() - persistent vInitialized; - if isempty(vInitialized) - vInitialized = griddynMEX(0, 5); - end - v = vInitialized; -end diff --git a/interfaces/matlab/target/+griddyn/griddyn_solve_error.m b/interfaces/matlab/target/+griddyn/griddyn_solve_error.m deleted file mode 100644 index add454222..000000000 --- a/interfaces/matlab/target/+griddyn/griddyn_solve_error.m +++ /dev/null @@ -1,7 +0,0 @@ -function v = griddyn_solve_error() - persistent vInitialized; - if isempty(vInitialized) - vInitialized = griddynMEX(0, 8); - end - v = vInitialized; -end diff --git a/interfaces/matlab/target/+griddyn/griddyn_unknown_parameter.m b/interfaces/matlab/target/+griddyn/griddyn_unknown_parameter.m deleted file mode 100644 index 1cafa2afb..000000000 --- a/interfaces/matlab/target/+griddyn/griddyn_unknown_parameter.m +++ /dev/null @@ -1,7 +0,0 @@ -function v = griddyn_unknown_parameter() - persistent vInitialized; - if isempty(vInitialized) - vInitialized = griddynMEX(0, 3); - end - v = vInitialized; -end diff --git a/interfaces/matlab/target/+griddyn/new_charp.m b/interfaces/matlab/target/+griddyn/new_charp.m deleted file mode 100644 index 898134f12..000000000 --- a/interfaces/matlab/target/+griddyn/new_charp.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = new_charp(varargin) - [varargout{1:nargout}] = griddynMEX(10, varargin{:}); -end diff --git a/interfaces/matlab/target/+griddyn/new_doublep.m b/interfaces/matlab/target/+griddyn/new_doublep.m deleted file mode 100644 index ccd73f422..000000000 --- a/interfaces/matlab/target/+griddyn/new_doublep.m +++ /dev/null @@ -1,3 +0,0 @@ -function varargout = new_doublep(varargin) - [varargout{1:nargout}] = griddynMEX(5, varargin{:}); -end diff --git a/interfaces/matlab/target/SwigGet.m b/interfaces/matlab/target/SwigGet.m deleted file mode 100644 index 1d29a12de..000000000 --- a/interfaces/matlab/target/SwigGet.m +++ /dev/null @@ -1,3 +0,0 @@ -function ptr = SwigGet(self) - ptr = []; -end diff --git a/interfaces/matlab/target/SwigMem.m b/interfaces/matlab/target/SwigMem.m deleted file mode 100644 index 8227dd1d9..000000000 --- a/interfaces/matlab/target/SwigMem.m +++ /dev/null @@ -1,18 +0,0 @@ -function varargout = SwigMem(varargin) - persistent mem - mlock - if (nargin > 1) - error('Too many input arguments') - end - if nargin==0 - if (nargout > 1) - error('Too many output arguments') - end - varargout{1} = mem; - else - if (nargout > 0) - error('Too many output arguments') - end - mem = varargin{1}; - end -end diff --git a/interfaces/matlab/target/SwigRef.m b/interfaces/matlab/target/SwigRef.m deleted file mode 100644 index 4c9ce872f..000000000 --- a/interfaces/matlab/target/SwigRef.m +++ /dev/null @@ -1,35 +0,0 @@ -classdef SwigRef < handle - properties(Hidden = true, Access = public) - swigPtr - end - methods(Static = true, Access = protected) - function obj = Null() - persistent obj_null - if isempty(obj_null) - obj_null = SwigRef(); - end - obj = obj_null; - end - end - methods - function out = saveobj(self) - warning('Serializing SWIG objects not supported.'); - out = saveobj('Serializing SWIG object not supported'); - end - function b = isnull(self) - b = isempty(self.swigPtr); - end - function SwigSet(self,ptr) - self.swigPtr = ptr; - end - function ptr = SwigGet(self) - ptr = self.swigPtr; - end - end - methods(Static) - function obj = loadobj(s) - warning('Serializing SWIG objects not supported.'); - obj = SwigRef.Null(); - end - end -end diff --git a/interfaces/matlab/target/griddynMEX.cpp b/interfaces/matlab/target/griddynMEX.cpp deleted file mode 100644 index 773f0f3e9..000000000 --- a/interfaces/matlab/target/griddynMEX.cpp +++ /dev/null @@ -1,7616 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.11 - * - * This file is not intended to be easily readable and contains a number of - * coding conventions designed to improve portability and efficiency. Do not make - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. - * ----------------------------------------------------------------------------- */ - -#define SWIGMATLAB -#define SWIG_name_d "griddyn" -#define SWIG_name griddyn - -#define SWIG_op_prefix "op_" -#define SWIG_pkg_name "griddyn" -#define SwigVar_mxArray mxArray* - -#ifdef __cplusplus -/* SwigValueWrapper is described in swig.swg */ -template -class SwigValueWrapper { - struct SwigMovePointer { - T* ptr; - SwigMovePointer(T* p): ptr(p) {} - ~SwigMovePointer() { delete ptr; } - SwigMovePointer& operator=(SwigMovePointer& rhs) - { - T* oldptr = ptr; - ptr = 0; - delete oldptr; - ptr = rhs.ptr; - rhs.ptr = 0; - return *this; - } - } pointer; - SwigValueWrapper& operator=(const SwigValueWrapper& rhs); - SwigValueWrapper(const SwigValueWrapper& rhs); - - public: - SwigValueWrapper(): pointer(0) {} - SwigValueWrapper& operator=(const T& t) - { - SwigMovePointer tmp(new T(t)); - pointer = tmp; - return *this; - } - operator T&() const { return *pointer.ptr; } - T* operator&() { return pointer.ptr; } -}; - -template -T SwigValueInit() -{ - return T(); -} -#endif - -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 - */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if defined(__GNUC__) -# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && \ - !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && \ - !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - -/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ -#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) -# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 -#endif - -/* Intel's compiler complains if a variable which was never initialised is - * cast to void, which is a common idiom which we use to indicate that we - * are aware a variable isn't used. So we just silence that warning. - * See: https://github.com/swig/swig/issues/192 for more discussion. - */ -#ifdef __INTEL_COMPILER -# pragma warning disable 592 -#endif - -/* Workaround, Octave's mex.h lacks uint64_t */ -#include -/* MATLAB's C-API */ -#include -/* MISC C libraries */ -#include -#include -#include -#include -#include - -/* ----------------------------------------------------------------------------- - * swigrun.swg - * - * This file contains generic C API SWIG runtime support for pointer - * type checking. - * ----------------------------------------------------------------------------- */ - -/* This should only be incremented when either the layout of swig_type_info changes, - or for whatever reason, the runtime changes incompatibly */ -#define SWIG_RUNTIME_VERSION "4" - -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ -#ifdef SWIG_TYPE_TABLE -# define SWIG_QUOTE_STRING(x) #x -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) -#else -# define SWIG_TYPE_TABLE_NAME -#endif - -/* - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for - creating a static or dynamic library from the SWIG runtime code. - In 99.9% of the cases, SWIG just needs to declare them as 'static'. - - But only do this if strictly necessary, ie, if you have problems - with your compiler or suchlike. -*/ - -#ifndef SWIGRUNTIME -# define SWIGRUNTIME SWIGINTERN -#endif - -#ifndef SWIGRUNTIMEINLINE -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE -#endif - -/* Generic buffer size */ -#ifndef SWIG_BUFFER_SIZE -# define SWIG_BUFFER_SIZE 1024 -#endif - -/* Flags for pointer conversions */ -#define SWIG_POINTER_DISOWN 0x1 -#define SWIG_CAST_NEW_MEMORY 0x2 - -/* Flags for new pointer objects */ -#define SWIG_POINTER_OWN 0x1 - -/* - Flags/methods for returning states. - - The SWIG conversion methods, as ConvertPtr, return an integer - that tells if the conversion was successful or not. And if not, - an error code can be returned (see swigerrors.swg for the codes). - - Use the following macros/flags to set or process the returning - states. - - In old versions of SWIG, code such as the following was usually written: - - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { - // success code - } else { - //fail code - } - - Now you can be more explicit: - - int res = SWIG_ConvertPtr(obj,vptr,ty.flags); - if (SWIG_IsOK(res)) { - // success code - } else { - // fail code - } - - which is the same really, but now you can also do - - Type *ptr; - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); - if (SWIG_IsOK(res)) { - // success code - if (SWIG_IsNewObj(res) { - ... - delete *ptr; - } else { - ... - } - } else { - // fail code - } - - I.e., now SWIG_ConvertPtr can return new objects and you can - identify the case and take care of the deallocation. Of course that - also requires SWIG_ConvertPtr to return new result values, such as - - int SWIG_ConvertPtr(obj, ptr,...) { - if () { - if () { - *ptr = ; - return SWIG_NEWOBJ; - } else { - *ptr = ; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } - } - - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the - SWIG errors code. - - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code - allows to return the 'cast rank', for example, if you have this - - int food(double) - int fooi(int); - - and you call - - food(1) // cast rank '1' (1 -> 1.0) - fooi(1) // cast rank '0' - - just use the SWIG_AddCast()/SWIG_CheckState() -*/ - -#define SWIG_OK (0) -#define SWIG_ERROR (-1) -#define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) - -/* The CastRankLimit says how many bits are used for the cast rank */ -#define SWIG_CASTRANKLIMIT (1 << 8) -/* The NewMask denotes the object was created (using new/malloc) */ -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) -/* The TmpMask is for in/out typemaps that use temporal objects */ -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) -/* Simple returning values */ -#define SWIG_BADOBJ (SWIG_ERROR) -#define SWIG_OLDOBJ (SWIG_OK) -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) -/* Check, add and del mask methods */ -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) - -/* Cast-Rank Mode */ -#if defined(SWIG_CASTRANK_MODE) -# ifndef SWIG_TypeRank -# define SWIG_TypeRank unsigned long -# endif -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ -# define SWIG_MAXCASTRANK (2) -# endif -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) - 1) -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) -{ - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; -} -SWIGINTERNINLINE int SWIG_CheckState(int r) -{ - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; -} -#else /* no cast-rank mode */ -# define SWIG_AddCast(r) (r) -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) -#endif - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void* (*swig_converter_func)(void*, int*); -typedef struct swig_type_info* (*swig_dycast_func)(void**); - -/* Structure to store information on one type */ -typedef struct swig_type_info { - const char* name; /* mangled name of this type */ - const char* str; /* human readable name of this type */ - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ - struct swig_cast_info* cast; /* linked list of types that can cast into this type */ - void* clientdata; /* language specific type data */ - int owndata; /* flag if the structure owns the clientdata */ -} swig_type_info; - -/* Structure to store a type and conversion function used for casting */ -typedef struct swig_cast_info { - swig_type_info* type; /* pointer to type that is equivalent to this type */ - swig_converter_func converter; /* function to cast the void pointers */ - struct swig_cast_info* next; /* pointer to next cast in linked list */ - struct swig_cast_info* prev; /* pointer to the previous cast */ -} swig_cast_info; - -/* Structure used to store module information - * Each module generates one structure like this, and the runtime collects - * all of these structures and stores them in a circularly linked list.*/ -typedef struct swig_module_info { - swig_type_info** - types; /* Array of pointers to swig_type_info structures that are in this module */ - size_t size; /* Number of types in this module */ - struct swig_module_info* next; /* Pointer to next element in circularly linked list */ - swig_type_info** type_initial; /* Array of initially generated type structures */ - swig_cast_info** cast_initial; /* Array of initially generated casting structures */ - void* clientdata; /* Language specific module data */ -} swig_module_info; - -/* - Compare two type names skipping the space characters, therefore - "char*" == "char *" and "Class" == "Class", etc. - - Return 0 when the two name types are equivalent, as in - strncmp, but skipping ' '. -*/ -SWIGRUNTIME int SWIG_TypeNameComp(const char* f1, const char* l1, const char* f2, const char* l2) -{ - for (; (f1 != l1) && (f2 != l2); ++f1, ++f2) { - while ((*f1 == ' ') && (f1 != l1)) - ++f1; - while ((*f2 == ' ') && (f2 != l2)) - ++f2; - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; - } - return (int)((l1 - f1) - (l2 - f2)); -} - -/* - Check type equivalence in a name list like ||... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb -*/ -SWIGRUNTIME int SWIG_TypeCmp(const char* nb, const char* tb) -{ - int equiv = 1; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (equiv != 0 && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = SWIG_TypeNameComp(nb, ne, tb, te); - if (*ne) ++ne; - } - return equiv; -} - -/* - Check type equivalence in a name list like ||... - Return 0 if not equal, 1 if equal -*/ -SWIGRUNTIME int SWIG_TypeEquiv(const char* nb, const char* tb) -{ - return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; -} - -/* - Check the typename -*/ -SWIGRUNTIME swig_cast_info* SWIG_TypeCheck(const char* c, swig_type_info* ty) -{ - if (ty) { - swig_cast_info* iter = ty->cast; - while (iter) { - if (strcmp(iter->type->name, c) == 0) { - if (iter == ty->cast) return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison -*/ -SWIGRUNTIME swig_cast_info* SWIG_TypeCheckStruct(swig_type_info* from, swig_type_info* ty) -{ - if (ty) { - swig_cast_info* iter = ty->cast; - while (iter) { - if (iter->type == from) { - if (iter == ty->cast) return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Cast a pointer up an inheritance hierarchy -*/ -SWIGRUNTIMEINLINE void* SWIG_TypeCast(swig_cast_info* ty, void* ptr, int* newmemory) -{ - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); -} - -/* - Dynamic pointer casting. Down an inheritance hierarchy -*/ -SWIGRUNTIME swig_type_info* SWIG_TypeDynamicCast(swig_type_info* ty, void** ptr) -{ - swig_type_info* lastty = ty; - if (!ty || !ty->dcast) return ty; - while (ty && (ty->dcast)) { - ty = (*ty->dcast)(ptr); - if (ty) lastty = ty; - } - return lastty; -} - -/* - Return the name associated with this type -*/ -SWIGRUNTIMEINLINE const char* SWIG_TypeName(const swig_type_info* ty) -{ - return ty->name; -} - -/* - Return the pretty name associated with this type, - that is an unmangled type name in a form presentable to the user. -*/ -SWIGRUNTIME const char* SWIG_TypePrettyName(const swig_type_info* type) -{ - /* The "str" field contains the equivalent pretty names of the - type, separated by vertical-bar characters. We choose - to print the last name, as it is often (?) the most - specific. */ - if (!type) return NULL; - if (type->str != NULL) { - const char* last_name = type->str; - const char* s; - for (s = type->str; *s; s++) - if (*s == '|') last_name = s + 1; - return last_name; - } else - return type->name; -} - -/* - Set the clientdata field for a type -*/ -SWIGRUNTIME void SWIG_TypeClientData(swig_type_info* ti, void* clientdata) -{ - swig_cast_info* cast = ti->cast; - /* if (ti->clientdata == clientdata) return; */ - ti->clientdata = clientdata; - - while (cast) { - if (!cast->converter) { - swig_type_info* tc = cast->type; - if (!tc->clientdata) { - SWIG_TypeClientData(tc, clientdata); - } - } - cast = cast->next; - } -} -SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info* ti, void* clientdata) -{ - SWIG_TypeClientData(ti, clientdata); - ti->owndata = 1; -} - -/* - Search for a swig_type_info structure only by mangled name - Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info* - SWIG_MangledTypeQueryModule(swig_module_info* start, swig_module_info* end, const char* name) -{ - swig_module_info* iter = start; - do { - if (iter->size) { - size_t l = 0; - size_t r = iter->size - 1; - do { - /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - size_t i = (l + r) >> 1; - const char* iname = iter->types[i]->name; - if (iname) { - int compare = strcmp(name, iname); - if (compare == 0) { - return iter->types[i]; - } else if (compare < 0) { - if (i) { - r = i - 1; - } else { - break; - } - } else if (compare > 0) { - l = i + 1; - } - } else { - break; /* should never happen */ - } - } while (l <= r); - } - iter = iter->next; - } while (iter != end); - return 0; -} - -/* - Search for a swig_type_info structure for either a mangled name or a human readable name. - It first searches the mangled names of the types, which is a O(log #types) - If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info* - SWIG_TypeQueryModule(swig_module_info* start, swig_module_info* end, const char* name) -{ - /* STEP 1: Search the name field using binary search */ - swig_type_info* ret = SWIG_MangledTypeQueryModule(start, end, name); - if (ret) { - return ret; - } else { - /* STEP 2: If the type hasn't been found, do a complete search - of the str field (the human readable name) */ - swig_module_info* iter = start; - do { - size_t i = 0; - for (; i < iter->size; ++i) { - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) - return iter->types[i]; - } - iter = iter->next; - } while (iter != end); - } - - /* neither found a match */ - return 0; -} - -/* - Pack binary data into a string -*/ -SWIGRUNTIME char* SWIG_PackData(char* c, void* ptr, size_t sz) -{ - static const char hex[17] = "0123456789abcdef"; - const unsigned char* u = (unsigned char*)ptr; - const unsigned char* eu = u + sz; - for (; u != eu; ++u) { - unsigned char uu = *u; - *(c++) = hex[(uu & 0xf0) >> 4]; - *(c++) = hex[uu & 0xf]; - } - return c; -} - -/* - Unpack binary data from a string -*/ -SWIGRUNTIME const char* SWIG_UnpackData(const char* c, void* ptr, size_t sz) -{ - unsigned char* u = (unsigned char*)ptr; - const unsigned char* eu = u + sz; - for (; u != eu; ++u) { - char d = *(c++); - unsigned char uu; - if ((d >= '0') && (d <= '9')) - uu = (unsigned char)((d - '0') << 4); - else if ((d >= 'a') && (d <= 'f')) - uu = (unsigned char)((d - ('a' - 10)) << 4); - else - return (char*)0; - d = *(c++); - if ((d >= '0') && (d <= '9')) - uu |= (unsigned char)(d - '0'); - else if ((d >= 'a') && (d <= 'f')) - uu |= (unsigned char)(d - ('a' - 10)); - else - return (char*)0; - *u = uu; - } - return c; -} - -/* - Pack 'void *' into a string buffer. -*/ -SWIGRUNTIME char* SWIG_PackVoidPtr(char* buff, void* ptr, const char* name, size_t bsz) -{ - char* r = buff; - if ((2 * sizeof(void*) + 2) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r, &ptr, sizeof(void*)); - if (strlen(name) + 1 > (bsz - (r - buff))) return 0; - strcpy(r, name); - return buff; -} - -SWIGRUNTIME const char* SWIG_UnpackVoidPtr(const char* c, void** ptr, const char* name) -{ - if (*c != '_') { - if (strcmp(c, "NULL") == 0) { - *ptr = (void*)0; - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c, ptr, sizeof(void*)); -} - -SWIGRUNTIME char* SWIG_PackDataName(char* buff, void* ptr, size_t sz, const char* name, size_t bsz) -{ - char* r = buff; - size_t lname = (name ? strlen(name) : 0); - if ((2 * sz + 2 + lname) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r, ptr, sz); - if (lname) { - strncpy(r, name, lname + 1); - } else { - *r = 0; - } - return buff; -} - -SWIGRUNTIME const char* SWIG_UnpackDataName(const char* c, void* ptr, size_t sz, const char* name) -{ - if (*c != '_') { - if (strcmp(c, "NULL") == 0) { - memset(ptr, 0, sz); - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c, ptr, sz); -} - -#ifdef __cplusplus -} -#endif - -/* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 -#define SWIG_SystemError -10 -#define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 -#define SWIG_NullReferenceError -13 - -/* Last error */ -static int SWIG_lasterror_code = 0; -static char SWIG_lasterror_msg[1024]; -SWIGRUNTIME void SWIG_Error(int code, const char* format, ...) -{ - SWIG_lasterror_code = code; - va_list arg; - va_start(arg, format); - vsnprintf(SWIG_lasterror_msg, sizeof(SWIG_lasterror_msg), format, arg); - va_end(arg); -} - -SWIGRUNTIME const char* SWIG_ErrorType(int code) -{ - switch (code) { - case SWIG_MemoryError: - return "SWIG:MemoryError"; - case SWIG_IOError: - return "SWIG:IOError"; - case SWIG_RuntimeError: - return "SWIG:RuntimeError"; - case SWIG_IndexError: - return "SWIG:IndexError"; - case SWIG_TypeError: - return "SWIG:TypeError"; - case SWIG_DivisionByZero: - return "SWIG:DivisionByZero"; - case SWIG_OverflowError: - return "SWIG:OverflowError"; - case SWIG_SyntaxError: - return "SWIG:SyntaxError"; - case SWIG_ValueError: - return "SWIG:ValueError"; - case SWIG_SystemError: - return "SWIG:SystemError"; - case SWIG_AttributeError: - return "SWIG:AttributeError"; - } - return "SWIG:UnknownError"; -} - -SWIGRUNTIME int SWIG_check_num_args(const char* func_name, - int num_args, - int max_args, - int min_args, - int varargs) -{ - if (num_args > max_args && !varargs) { - SWIG_Error(SWIG_RuntimeError, - "function %s takes at most %i arguments", - func_name, - max_args); - } else if (num_args < min_args) { - SWIG_Error(SWIG_RuntimeError, - "function %s requires at least %i arguments", - func_name, - min_args); - } else { - return 1; - } - return 0; -} - -#define SWIG_fail goto fail - -#define SWIG_Matlab_ConvertPtr(obj, pptr, type, flags) \ - SWIG_Matlab_ConvertPtrAndOwn(obj, pptr, type, flags, 0) -#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Matlab_ConvertPtr(obj, pptr, type, flags) -#define SWIG_ConvertPtrAndOwn(obj, pptr, type, flags, own) \ - SWIG_Matlab_ConvertPtrAndOwn(obj, pptr, type, flags, own) -#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Matlab_ConvertPtr(obj, pptr, type, flags) -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Matlab_NewPointerObj(ptr, type, flags) -#define swig_owntype int - -#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Matlab_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Matlab_NewPackedObj(ptr, sz, type) - -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0) -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0) - -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Matlab_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Matlab_NewPackedObj(ptr, sz, type) - -#define SWIG_GetModule(clientdata) SWIG_Matlab_GetModule(clientdata) -#define SWIG_SetModule(clientdata, pointer) SWIG_Matlab_SetModule(pointer); -#define SWIG_MODULE_CLIENTDATA_TYPE void* - -#define Matlab_Error_Occurred() 0 -#define SWIG_Matlab_AddErrorMsg(msg) \ - { \ - ; \ - } - -SWIGRUNTIME swig_module_info* SWIG_Matlab_GetModule(void* clientdata); -SWIGRUNTIME void SWIG_Matlab_SetModule(swig_module_info* pointer); - -/* For backward compatibility only */ -#define SWIG_POINTER_EXCEPTION 0 -#define SWIG_arg_fail(arg) 0 - -/* Pointer to C/C++ object, including type information and reference counters */ -typedef struct SwigPtr { - void* ptr; - swig_type_info* type; - int own; - void* self; - struct SwigPtr* next; -} SwigPtr; -static swig_module_info* saved_swig_module = 0; - -/* Add new pointer object to the memory allocator - Returns the location of the new element by reference and a return flag by value. - */ -int SWIG_Matlab_NewPointer(SwigPtr** swig_ptr, void* ptr, swig_type_info* type, int own) -{ - /* Check input arguments */ - if (!swig_ptr || !type) return 1; - - /* Allocate memory */ - SwigPtr* obj = (SwigPtr*)malloc(sizeof(SwigPtr)); - if (!obj) return 1; - - /* Initialize object */ - obj->ptr = ptr; - obj->type = type; - obj->own = own; - obj->self = obj; - obj->next = 0; - - /* Return memory reference and successful return */ - *swig_ptr = obj; - return 0; -} - -/* Free pointer object - Returns a void* with the object to be freed (if any) - */ -void* SWIG_Matlab_DeletePointer(SwigPtr* p) -{ - /* Quick return if null pointer? */ - if (p == 0) return 0; - - /* Clear and free */ - void* ret = p->own ? p->ptr : 0; - p->ptr = 0; - p->type = 0; - p->own = 0; - p->self = 0; - p->next = 0; - free(p); - return ret; -} - -/* This should probably be moved somewhere else */ -#ifdef __cplusplus -extern "C" -#endif /* cplusplus */ - void - SWIG_Matlab_ExitFcn(void) -{ - /* Unused at the moment */ -} - -SWIGRUNTIME int SWIG_Matlab_CallInterp(int nlhs, - mxArray* plhs[], - int nrhs, - mxArray* prhs[], - const char* functionName) -{ -#ifdef HAVE_OCTAVE - return mexCallMATLAB(nlhs, plhs, nrhs, prhs, functionName); -#else - mxArray* ex = mexCallMATLABWithTrap(nlhs, plhs, nrhs, prhs, functionName); - if (ex) { - mxDestroyArray(ex); - return 1; - } else { - return 0; - } -#endif -} - -SWIGRUNTIME mxArray* SWIG_Matlab_CallInterpEx(int nlhs, - mxArray* plhs[], - int nrhs, - mxArray* prhs[], - const char* functionName) -{ -#ifdef HAVE_OCTAVE - int flag = mexCallMATLAB(nlhs, plhs, nrhs, prhs, functionName); - if (flag) { - mexErrMsgIdAndTxt("SWIG:CallInterpEx", "Not implemented for Octave"); - } - return 0; -#else - return mexCallMATLABWithTrap(nlhs, plhs, nrhs, prhs, functionName); -#endif -} - -/* Convert a packed value value */ -SWIGRUNTIME int SWIG_Matlab_ConvertPacked(mxArray* SWIGUNUSEDPARM(pm), - void* SWIGUNUSEDPARM(ptr), - size_t SWIGUNUSEDPARM(sz), - swig_type_info* SWIGUNUSEDPARM(ty)) -{ - mexErrMsgIdAndTxt("SWIG:ConvertPacked", "Not implemented"); - return SWIG_ERROR; -} - -/* Runtime API implementation */ -SWIGRUNTIME mxArray* SWIG_Matlab_NewPointerObj(void* ptr, swig_type_info* type, int flags) -{ - /* Ownership? */ - int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; - - /* Allocate a pointer object */ - SwigPtr* swig_ptr = 0; - if (SWIG_Matlab_NewPointer(&swig_ptr, ptr, type, own)) { - mexErrMsgIdAndTxt("SWIG:NewPointerObj", "Cannot allocate pointer"); - } - - /* Create a SwigRef instance */ - mxArray* pm = 0; - int ex = SWIG_Matlab_CallInterp(1, &pm, 0, 0, "SwigRef"); - if (ex) mexErrMsgIdAndTxt("SWIG:NewPointerObj", "Cannot create SwigRef instance"); - - /* Set pointer property */ - mxArray* pm_ptr = mxCreateNumericMatrix(1, 1, mxUINT64_CLASS, mxREAL); - *(uint64_T*)mxGetData(pm_ptr) = (uint64_T)swig_ptr; - if (!pm_ptr) mexErrMsgIdAndTxt("SWIG:NewPointerObj", "mxCreateNumericMatrix failed"); - - mxArray* rhs[2] = {pm, pm_ptr}; - mexCallMATLAB(0, 0, 2, rhs, "SwigSet"); - mxDestroyArray(pm_ptr); - - /* Create a proxy class of the desired type */ - if (type->clientdata) { - const char* matlab_classname = (const char*)type->clientdata; - mxArray* pm_test = 0; - ex = SWIG_Matlab_CallInterp(1, &pm_test, 1, &pm, matlab_classname); - if (ex) { - mexWarnMsgIdAndTxt("SWIG:NewPointerObj", - "NewPointerObj problem. creating SwigRef as opposed to %s", - matlab_classname); - } else { - mxDestroyArray(pm); - pm = pm_test; - } - } - - return pm; -} - -/* Create a new packed object */ - -SWIGRUNTIMEINLINE mxArray* SWIG_Matlab_NewPackedObj(void* SWIGUNUSEDPARM(ptr), - size_t SWIGUNUSEDPARM(sz), - swig_type_info* SWIGUNUSEDPARM(type)) -{ - mexErrMsgIdAndTxt("SWIG:NewPackedOb", "Not implemented"); - return 0; -} - -SWIGRUNTIME int SWIG_Matlab_isOwned(mxArray* pm) -{ - /* Get index, represented as a uint64_T scalar */ - mxArray* pm_ptr; - mexCallMATLAB(1, &pm_ptr, 1, &pm, "SwigGet"); - if (!pm_ptr || mxGetNumberOfElements(pm_ptr) != 1 || mxGetClassID(pm_ptr) != mxUINT64_CLASS || - mxIsComplex(pm_ptr)) { - if (pm_ptr) mxDestroyArray(pm_ptr); - return SWIG_ERROR; - } - SwigPtr* p = (SwigPtr*)(*(uint64_T*)mxGetData(pm_ptr)); - mxDestroyArray(pm_ptr); - - return p ? p->own : 0; -} - -SWIGRUNTIME SwigPtr* SWIG_Matlab_getSwigPtr(mxArray* pm) -{ - /* Get index, represented as a uint64_T scalar */ - mxArray* pm_ptr; - mexCallMATLAB(1, &pm_ptr, 1, &pm, "SwigGet"); - if (!pm_ptr || mxGetNumberOfElements(pm_ptr) != 1 || mxGetClassID(pm_ptr) != mxUINT64_CLASS || - mxIsComplex(pm_ptr)) { - if (pm_ptr) mxDestroyArray(pm_ptr); - return 0; - } - SwigPtr* p = (SwigPtr*)(*(uint64_T*)mxGetData(pm_ptr)); - mxDestroyArray(pm_ptr); - - /* Consistency check */ - if (p->self != p) return 0; - - /* Get pointer object */ - return p; -} - -SWIGRUNTIME int - SWIG_Matlab_ConvertPtrAndOwn(mxArray* pm, void** ptr, swig_type_info* type, int flags, int* own) -{ - /* Get index, represented as a uint64_T scalar */ - mxArray* pm_ptr; - mexCallMATLAB(1, &pm_ptr, 1, &pm, "SwigGet"); - if (!pm_ptr || mxGetNumberOfElements(pm_ptr) != 1 || mxGetClassID(pm_ptr) != mxUINT64_CLASS || - mxIsComplex(pm_ptr)) { - if (pm_ptr) mxDestroyArray(pm_ptr); - return SWIG_ERROR; - } - SwigPtr* swig_ptr = (SwigPtr*)(*(uint64_T*)mxGetData(pm_ptr)); - mxDestroyArray(pm_ptr); - - /* Get pointer object */ - if (!swig_ptr) return SWIG_ERROR; - - swig_cast_info* tc; - int same_type = 0; - SwigPtr* p = swig_ptr; - while (p) { - /* Loop over types */ - swig_type_info* p_type = p->type; - - /* No type cast needed */ - if (p_type == type || !type) { - same_type = 1; - break; - } - - /* Check if type conversion is possible */ - tc = SWIG_TypeCheck(p_type->name, type); - if (tc) break; - - /* Check next type */ - p = p->next; - } - - /* Conversion not possible */ - if (!same_type && !tc) return SWIG_ERROR; - - /* Get data */ - if (ptr) *ptr = p->ptr; - if (own) *own = p->own; - - /* Set ownership marker to false? */ - if (flags & SWIG_POINTER_DISOWN) { - SWIG_Matlab_DeletePointer(swig_ptr); - } - - /* No type cast needed */ - if (same_type || !ptr) { - return SWIG_OK; - } - - /* Do type-cast */ - int newmemory = 0; - *ptr = SWIG_TypeCast(tc, *ptr, &newmemory); - if (newmemory == SWIG_CAST_NEW_MEMORY) { - if (own) { - *own = *own | SWIG_CAST_NEW_MEMORY; - } else { - /* badly formed typemap which will lead to a memory leak - it must set and use own to - * delete *ptr */ - mexErrMsgIdAndTxt("SWIG:ConvertPointerObj", - "SWIG error in converting pointer for type %s. Bad typemap?", - type->name); - return SWIG_ERROR; - } - } - return SWIG_OK; -} - -SWIGRUNTIME swig_module_info* SWIG_Matlab_GetModule(void* SWIGUNUSEDPARM(clientdata)) -{ - if (!saved_swig_module) { - /* First call for this module, fetch pointer from MATLAB */ - mxArray* mem = 0; - int flag = mexCallMATLAB(1, &mem, 0, 0, "SwigMem"); - if (flag || !mem) mexErrMsgIdAndTxt("SWIG:GetModule", "Cannot call SwigMem"); - /* On first call, mem is an empty matrix */ - if (mxGetNumberOfElements(mem) != 0) { - if (!mxIsStruct(mem)) { - mexErrMsgIdAndTxt("SWIG:GetModule", "Corrupted memory"); - } - mxArray* module = mxGetField( - mem, 0, "swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME); - if (module && mxGetNumberOfElements(module) == 1 && - mxGetClassID(module) == mxUINT64_CLASS && !mxIsComplex(module)) { - /* Cast memory as a pointer */ - saved_swig_module = (swig_module_info*)(*(uint64_T*)mxGetData(module)); - } - } - mxDestroyArray(mem); - } - return saved_swig_module; -} - -SWIGRUNTIME void SWIG_Matlab_SetModule(swig_module_info* pointer) -{ - mxArray* mem = 0; - const char* fields[1] = { - "swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME}; - int flag = mexCallMATLAB(1, &mem, 0, 0, "SwigMem"); - if (flag || !mem) mexErrMsgIdAndTxt("SWIG:SetModule", "Cannot call SwigMem"); - /* Under normal circumstances, swigMem is an empty matrix */ - /* but is not required to be for a valid call to SWIG_Matlab_SetModule() */ - if (mxGetNumberOfElements(mem) == 0) { - mxDestroyArray(mem); - mem = mxCreateStructMatrix(1, 1, 1, fields); - if (!mem) mexErrMsgIdAndTxt("SWIG:SetModule", "mxCreateStructMatrix failed"); - mxArray* module = mxCreateNumericMatrix(1, 1, mxUINT64_CLASS, mxREAL); - if (!module) mexErrMsgIdAndTxt("SWIG:SetModule", "mxCreateNumericMatrix failed"); - *(uint64_T*)mxGetData(module) = (uint64_T)pointer; - mxSetField(mem, 0, fields[0], module); - } else { - int nfields = 0; - int fieldNum = 0; - /* Add to existing mem if not the same */ - if (!mxIsStruct(mem)) { - mexErrMsgIdAndTxt("SWIG:SetModule", "Corrupted memory"); - } - nfields = mxGetNumberOfFields(mem); - /* Check if same type table */ - int ii; - for (ii = 0; ii < nfields; ++ii) { - if (strcmp(mxGetFieldNameByNumber(mem, ii), fields[0]) == 0) { - mxDestroyArray(mem); - return; - } - } - fieldNum = mxAddField(mem, fields[0]); - if (fieldNum < 0) mexErrMsgIdAndTxt("SWIG:SetModule", "Error adding field to SwigMem"); - mxArray* module = mxCreateNumericMatrix(1, 1, mxUINT64_CLASS, mxREAL); - if (!module) mexErrMsgIdAndTxt("SWIG:SetModule", "mxCreateNumericMatrix failed"); - *(uint64_T*)mxGetData(module) = (uint64_T)pointer; - mxSetFieldByNumber(mem, 0, fieldNum, module); - } - /* Set variable in SwigMem */ - flag = mexCallMATLAB(0, 0, 1, &mem, "SwigMem"); - mxDestroyArray(mem); - if (flag) { - mexErrMsgIdAndTxt("SWIG:SetModule", "Could not set variable in SwigMem.\n"); - } - saved_swig_module = pointer; -} - -/* HACK HACK */ -#define SWIG_Matlab_SetConstant(dummy1, dummy2, pm) (pm) - -#ifdef __cplusplus -# include -# include -namespace swig { -// Stream buffer to allow redirecting output to MATLAB -class SWIG_Matlab_streambuf: public std::streambuf { - public: - SWIG_Matlab_streambuf() {} - - protected: - virtual int_type overflow(int_type ch) - { - if (ch != traits_type::eof()) { - mexPrintf("%c", static_cast(ch)); - } - return ch; - } - virtual std::streamsize xsputn(const char* s, std::streamsize num) - { - // Pass straight to mexPrintf without buffering - mexPrintf("%.*s", static_cast(num), s); - return num; - } -}; - -// Instantiation -static SWIG_Matlab_streambuf SWIG_Matlab_buf; -} // namespace swig -#endif /* cplusplus */ - -#define SWIG_exception_fail(code, msg) \ - do { \ - SWIG_Error(code, msg); \ - SWIG_fail; \ - } while (0) - -#define SWIG_contract_assert(expr, msg) \ - if (!(expr)) { \ - SWIG_Error(SWIG_RuntimeError, msg); \ - SWIG_fail; \ - } else - -/* -------- TYPES TABLE (BEGIN) -------- */ - -#define SWIGTYPE_p_char swig_types[0] -#define SWIGTYPE_p_double swig_types[1] -#define SWIGTYPE_p_doubleArray swig_types[2] -#define SWIGTYPE_p_f_int_int_double__void swig_types[3] -#define SWIGTYPE_p_griddyn_status_enum swig_types[4] -#define SWIGTYPE_p_int swig_types[5] -#define SWIGTYPE_p_p_char swig_types[6] -#define SWIGTYPE_p_void swig_types[7] -static swig_type_info* swig_types[9]; -static swig_module_info swig_module = {swig_types, 8, 0, 0, 0, 0}; -#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) -#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) - -/* -------- TYPES TABLE (END) -------- */ - -#define SWIGVERSION 0x030011 -#define SWIG_VERSION SWIGVERSION - -#define SWIG_as_voidptr(a) const_cast(static_cast(a)) -#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a), reinterpret_cast(a)) - -#include - -static double* new_doublep() -{ - return new double(); -} - -static double* copy_doublep(double value) -{ - return new double(value); -} - -static void delete_doublep(double* obj) -{ - if (obj) delete obj; -} - -static void doublep_assign(double* obj, double value) -{ - *obj = value; -} - -static double doublep_value(double* obj) -{ - return *obj; -} - -SWIGINTERN int SWIG_AsVal_double(mxArray* pm, double* val) -{ - if (!mxIsDouble(pm) || mxGetNumberOfElements(pm) != 1) return SWIG_TypeError; - if (val) *val = mxGetScalar(pm); - return SWIG_OK; -} - -SWIGINTERNINLINE mxArray* SWIG_From_double(double value) -{ - return mxCreateDoubleScalar(value); -} - -static char* new_charp() -{ - return new char(); -} - -static char* copy_charp(char value) -{ - return new char(value); -} - -static void delete_charp(char* obj) -{ - if (obj) delete obj; -} - -static void charp_assign(char* obj, char value) -{ - *obj = value; -} - -static char charp_value(char* obj) -{ - return *obj; -} - -SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) -{ - static int init = 0; - static swig_type_info* info = 0; - if (!init) { - info = SWIG_TypeQuery("_p_char"); - init = 1; - } - return info; -} - -SWIGINTERNINLINE mxArray* SWIG_FromCharPtrAndSize(const char* carray, size_t size) -{ - mwSize dims[2] = {1, (mwSize)size}; - mxArray* ret = mxCreateCharArray((mwSize)2, dims); - if (!ret) mexErrMsgIdAndTxt("SWIG:FromCharPtrAndSize", "mxCreateCharArray failed"); - mxChar* ret_data = (mxChar*)mxGetData(ret); - size_t i; - for (i = 0; i < size; ++i) - ret_data[i] = carray[i]; - return ret; -} - -SWIGINTERNINLINE mxArray* SWIG_FromCharPtr(const char* cptr) -{ - return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); -} - -SWIGINTERN int SWIG_AsCharPtrAndSize(mxArray* pm, char** cptr, size_t* psize, int* alloc) -{ - if (!mxIsChar(pm) || (mxGetNumberOfElements(pm) != 0 && mxGetM(pm) != 1)) return SWIG_TypeError; - size_t len = mxGetN(pm); - static char buf[256]; - int flag = mxGetString(pm, buf, (mwSize)sizeof(buf)); - if (flag) return SWIG_TypeError; - - if (alloc) { - *cptr = reinterpret_cast(memcpy((new char[len + 1]), buf, sizeof(char) * (len + 1))); - *alloc = SWIG_NEWOBJ; - } else if (cptr) - *cptr = buf; - if (psize) *psize = len + 1; - return SWIG_OK; -} - -SWIGINTERN int SWIG_AsCharArray(mxArray* obj, char* val, size_t size) -{ - char* cptr = 0; - size_t csize = 0; - int alloc = SWIG_OLDOBJ; - int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc); - if (SWIG_IsOK(res)) { - /* special case of single char conversion when we don't need space for NUL */ - if (size == 1 && csize == 2 && cptr && !cptr[1]) --csize; - if (csize <= size) { - if (val) { - if (csize) memcpy(val, cptr, csize * sizeof(char)); - if (csize < size) memset(val + csize, 0, (size - csize) * sizeof(char)); - } - if (alloc == SWIG_NEWOBJ) { - delete[] cptr; - res = SWIG_DelNewMask(res); - } - return res; - } - if (alloc == SWIG_NEWOBJ) delete[] cptr; - } - return SWIG_TypeError; -} - -#include -#if !defined(SWIG_NO_LLONG_MAX) -# if !defined(LLONG_MAX) && defined(__GNUC__) && defined(__LONG_LONG_MAX__) -# define LLONG_MAX __LONG_LONG_MAX__ -# define LLONG_MIN (-LLONG_MAX - 1LL) -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) -# endif -#endif - -SWIGINTERN int SWIG_AsVal_long(mxArray* pm, long* val) -{ - if (mxGetNumberOfElements(pm) != 1) return SWIG_TypeError; - switch (mxGetClassID(pm)) { - case mxINT8_CLASS: - if (val) *val = (long)(*(int8_T*)mxGetData(pm)); - break; - case mxUINT8_CLASS: - if (val) *val = (long)(*(uint8_T*)mxGetData(pm)); - break; - case mxINT16_CLASS: - if (val) *val = (long)(*(int16_T*)mxGetData(pm)); - break; - case mxUINT16_CLASS: - if (val) *val = (long)(*(uint16_T*)mxGetData(pm)); - break; - case mxINT32_CLASS: - if (val) *val = (long)(*(int32_T*)mxGetData(pm)); - break; - case mxUINT32_CLASS: - if (val) *val = (long)(*(uint32_T*)mxGetData(pm)); - break; - case mxINT64_CLASS: - if (val) *val = (long)(*(int64_T*)mxGetData(pm)); - break; - case mxUINT64_CLASS: - if (val) *val = (long)(*(uint64_T*)mxGetData(pm)); - break; - case mxDOUBLE_CLASS: { - double v = mxGetScalar(pm); - if (v != floor(v)) return SWIG_TypeError; - if (val) *val = (long)v; - break; - } - default: - return SWIG_TypeError; - } - return SWIG_OK; -} - -SWIGINTERN int SWIG_AsVal_char(mxArray* obj, char* val) -{ - int res = SWIG_AsCharArray(obj, val, 1); - if (!SWIG_IsOK(res)) { - long v; - res = SWIG_AddCast(SWIG_AsVal_long(obj, &v)); - if (SWIG_IsOK(res)) { - if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) { - if (val) *val = static_cast(v); - } else { - res = SWIG_OverflowError; - } - } - } - return res; -} - -SWIGINTERNINLINE mxArray* SWIG_From_char(char c) -{ - return SWIG_FromCharPtrAndSize(&c, 1); -} - -typedef double doubleArray; - -SWIGINTERN int SWIG_AsVal_unsigned_SS_long(mxArray* pm, unsigned long* val) -{ - if (mxGetNumberOfElements(pm) != 1) return SWIG_TypeError; - switch (mxGetClassID(pm)) { - case mxINT8_CLASS: - if (val) *val = (unsigned long)(*(int8_T*)mxGetData(pm)); - break; - case mxUINT8_CLASS: - if (val) *val = (unsigned long)(*(uint8_T*)mxGetData(pm)); - break; - case mxINT16_CLASS: - if (val) *val = (unsigned long)(*(int16_T*)mxGetData(pm)); - break; - case mxUINT16_CLASS: - if (val) *val = (unsigned long)(*(uint16_T*)mxGetData(pm)); - break; - case mxINT32_CLASS: - if (val) *val = (unsigned long)(*(int32_T*)mxGetData(pm)); - break; - case mxUINT32_CLASS: - if (val) *val = (unsigned long)(*(uint32_T*)mxGetData(pm)); - break; - case mxINT64_CLASS: - if (val) *val = (unsigned long)(*(int64_T*)mxGetData(pm)); - break; - case mxUINT64_CLASS: - if (val) *val = (unsigned long)(*(uint64_T*)mxGetData(pm)); - break; - case mxDOUBLE_CLASS: { - double v = mxGetScalar(pm); - if (v != floor(v)) return SWIG_TypeError; - if (val) *val = (unsigned long)v; - break; - } - default: - return SWIG_TypeError; - } - return SWIG_OK; -} - -SWIGINTERN int SWIG_AsVal_unsigned_SS_long_SS_long(mxArray* pm, unsigned long long* val) -{ - if (mxGetNumberOfElements(pm) != 1) return SWIG_TypeError; - switch (mxGetClassID(pm)) { - case mxINT8_CLASS: - if (val) *val = (unsigned long long)(*(int8_T*)mxGetData(pm)); - break; - case mxUINT8_CLASS: - if (val) *val = (unsigned long long)(*(uint8_T*)mxGetData(pm)); - break; - case mxINT16_CLASS: - if (val) *val = (unsigned long long)(*(int16_T*)mxGetData(pm)); - break; - case mxUINT16_CLASS: - if (val) *val = (unsigned long long)(*(uint16_T*)mxGetData(pm)); - break; - case mxINT32_CLASS: - if (val) *val = (unsigned long long)(*(int32_T*)mxGetData(pm)); - break; - case mxUINT32_CLASS: - if (val) *val = (unsigned long long)(*(uint32_T*)mxGetData(pm)); - break; - case mxINT64_CLASS: - if (val) *val = (unsigned long long)(*(int64_T*)mxGetData(pm)); - break; - case mxUINT64_CLASS: - if (val) *val = (unsigned long long)(*(uint64_T*)mxGetData(pm)); - break; - case mxDOUBLE_CLASS: { - double v = mxGetScalar(pm); - if (v != floor(v)) return SWIG_TypeError; - if (val) *val = (unsigned long long)v; - break; - } - default: - return SWIG_TypeError; - } - return SWIG_OK; -} - -SWIGINTERNINLINE int SWIG_AsVal_size_t(mxArray* obj, size_t* val) -{ - int res = SWIG_TypeError; -#ifdef SWIG_LONG_LONG_AVAILABLE - if (sizeof(size_t) <= sizeof(unsigned long)) { -#endif - unsigned long v; - res = SWIG_AsVal_unsigned_SS_long(obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast(v); -#ifdef SWIG_LONG_LONG_AVAILABLE - } else if (sizeof(size_t) <= sizeof(unsigned long long)) { - unsigned long long v; - res = SWIG_AsVal_unsigned_SS_long_SS_long(obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast(v); - } -#endif - return res; -} - -SWIGINTERN doubleArray* new_doubleArray(size_t nelements) -{ - return (new double[nelements]); -} -SWIGINTERN void delete_doubleArray(doubleArray* self) -{ - delete[] self; -} -SWIGINTERN double doubleArray_paren(doubleArray* self, size_t index) -{ - return self[index]; -} -SWIGINTERN void doubleArray_paren_asgn(doubleArray* self, size_t index, double value) -{ - self[index] = value; -} -SWIGINTERN double* doubleArray_cast(doubleArray* self) -{ - return self; -} -SWIGINTERN doubleArray* doubleArray_frompointer(double* t) -{ - return static_cast(t); -} - -SWIGINTERN int SWIG_AsVal_int(mxArray* obj, int* val) -{ - long v; - int res = SWIG_AsVal_long(obj, &v); - if (SWIG_IsOK(res)) { - if ((v < INT_MIN || v > INT_MAX)) { - return SWIG_OverflowError; - } else { - if (val) *val = static_cast(v); - } - } - return res; -} - -SWIGINTERNINLINE mxArray* SWIG_From_long(long value) -{ - mxArray* out = mxCreateNumericMatrix(1, 1, mxINT64_CLASS, mxREAL); - *((int64_T*)mxGetData(out)) = (int64_T)value; - return out; -} - -SWIGINTERNINLINE mxArray* SWIG_From_int(int value) -{ - return SWIG_From_long(value); -} - -#include "griddyn_export.h" -#include "griddyn_export_advanced.h" - -int _wrap_new_doublep(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - mxArray* _out; - double* result = 0; - - if (!SWIG_check_num_args("new_doublep", argc, 0, 0, 0)) { - SWIG_fail; - } - (void)argv; - result = (double*)new_doublep(); - _out = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_copy_doublep(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - double arg1; - double val1; - int ecode1 = 0; - mxArray* _out; - double* result = 0; - - if (!SWIG_check_num_args("copy_doublep", argc, 1, 1, 0)) { - SWIG_fail; - } - ecode1 = SWIG_AsVal_double(argv[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), - "in method '" - "copy_doublep" - "', argument " - "1" - " of type '" - "double" - "'"); - } - arg1 = static_cast(val1); - result = (double*)copy_doublep(arg1); - _out = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_delete_doublep(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - double* arg1 = (double*)0; - void* argp1 = 0; - int res1 = 0; - mxArray* _out; - - if (!SWIG_check_num_args("delete_doublep", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "delete_doublep" - "', argument " - "1" - " of type '" - "double *" - "'"); - } - arg1 = reinterpret_cast(argp1); - delete_doublep(arg1); - _out = (mxArray*)0; - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_doublep_assign(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - double* arg1 = (double*)0; - double arg2; - void* argp1 = 0; - int res1 = 0; - double val2; - int ecode2 = 0; - mxArray* _out; - - if (!SWIG_check_num_args("doublep_assign", argc, 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "doublep_assign" - "', argument " - "1" - " of type '" - "double *" - "'"); - } - arg1 = reinterpret_cast(argp1); - ecode2 = SWIG_AsVal_double(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "doublep_assign" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - doublep_assign(arg1, arg2); - _out = (mxArray*)0; - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_doublep_value(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - double* arg1 = (double*)0; - void* argp1 = 0; - int res1 = 0; - mxArray* _out; - double result; - - if (!SWIG_check_num_args("doublep_value", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "doublep_value" - "', argument " - "1" - " of type '" - "double *" - "'"); - } - arg1 = reinterpret_cast(argp1); - result = (double)doublep_value(arg1); - _out = SWIG_From_double(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_new_charp(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - mxArray* _out; - char* result = 0; - - if (!SWIG_check_num_args("new_charp", argc, 0, 0, 0)) { - SWIG_fail; - } - (void)argv; - result = (char*)new_charp(); - _out = SWIG_FromCharPtr((const char*)result); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_copy_charp(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - char arg1; - char val1; - int ecode1 = 0; - mxArray* _out; - char* result = 0; - - if (!SWIG_check_num_args("copy_charp", argc, 1, 1, 0)) { - SWIG_fail; - } - ecode1 = SWIG_AsVal_char(argv[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), - "in method '" - "copy_charp" - "', argument " - "1" - " of type '" - "char" - "'"); - } - arg1 = static_cast(val1); - result = (char*)copy_charp(arg1); - _out = SWIG_FromCharPtr((const char*)result); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_delete_charp(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - char* arg1 = (char*)0; - int res1; - char* buf1 = 0; - int alloc1 = 0; - mxArray* _out; - - if (!SWIG_check_num_args("delete_charp", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "delete_charp" - "', argument " - "1" - " of type '" - "char *" - "'"); - } - arg1 = reinterpret_cast(buf1); - delete_charp(arg1); - _out = (mxArray*)0; - if (_out) --resc, *resv++ = _out; - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return 0; -fail: - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return 1; -} - -int _wrap_charp_assign(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - char* arg1 = (char*)0; - char arg2; - int res1; - char* buf1 = 0; - int alloc1 = 0; - char val2; - int ecode2 = 0; - mxArray* _out; - - if (!SWIG_check_num_args("charp_assign", argc, 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "charp_assign" - "', argument " - "1" - " of type '" - "char *" - "'"); - } - arg1 = reinterpret_cast(buf1); - ecode2 = SWIG_AsVal_char(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "charp_assign" - "', argument " - "2" - " of type '" - "char" - "'"); - } - arg2 = static_cast(val2); - charp_assign(arg1, arg2); - _out = (mxArray*)0; - if (_out) --resc, *resv++ = _out; - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return 0; -fail: - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return 1; -} - -int _wrap_charp_value(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - char* arg1 = (char*)0; - int res1; - char* buf1 = 0; - int alloc1 = 0; - mxArray* _out; - char result; - - if (!SWIG_check_num_args("charp_value", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "charp_value" - "', argument " - "1" - " of type '" - "char *" - "'"); - } - arg1 = reinterpret_cast(buf1); - result = (char)charp_value(arg1); - _out = SWIG_From_char(static_cast(result)); - if (_out) --resc, *resv++ = _out; - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return 0; -fail: - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return 1; -} - -int _wrap_new_doubleArray(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - size_t arg1; - size_t val1; - int ecode1 = 0; - mxArray* _out; - doubleArray* result = 0; - - if (!SWIG_check_num_args("new_doubleArray", argc, 1, 1, 0)) { - SWIG_fail; - } - ecode1 = SWIG_AsVal_size_t(argv[0], &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), - "in method '" - "new_doubleArray" - "', argument " - "1" - " of type '" - "size_t" - "'"); - } - arg1 = static_cast(val1); - result = (doubleArray*)new_doubleArray(arg1); - _out = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_doubleArray, 1 | 0); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_delete_doubleArray(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - doubleArray* arg1 = (doubleArray*)0; - void* argp1 = 0; - int res1 = 0; - mxArray* _out; - - int is_owned; - if (!SWIG_check_num_args("delete_doubleArray", argc, 1, 1, 0)) { - SWIG_fail; - } - is_owned = SWIG_Matlab_isOwned(argv[0]); - res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_doubleArray, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "delete_doubleArray" - "', argument " - "1" - " of type '" - "doubleArray *" - "'"); - } - arg1 = reinterpret_cast(argp1); - if (is_owned) { - delete_doubleArray(arg1); - } - _out = (mxArray*)0; - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_doubleArray_paren(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - doubleArray* arg1 = (doubleArray*)0; - size_t arg2; - void* argp1 = 0; - int res1 = 0; - size_t val2; - int ecode2 = 0; - mxArray* _out; - double result; - - if (!SWIG_check_num_args("doubleArray_paren", argc, 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_doubleArray, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "doubleArray_paren" - "', argument " - "1" - " of type '" - "doubleArray *" - "'"); - } - arg1 = reinterpret_cast(argp1); - ecode2 = SWIG_AsVal_size_t(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "doubleArray_paren" - "', argument " - "2" - " of type '" - "size_t" - "'"); - } - arg2 = static_cast(val2); - result = (double)doubleArray_paren(arg1, arg2); - _out = SWIG_From_double(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_doubleArray_paren_asgn(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - doubleArray* arg1 = (doubleArray*)0; - size_t arg2; - double arg3; - void* argp1 = 0; - int res1 = 0; - size_t val2; - int ecode2 = 0; - double val3; - int ecode3 = 0; - mxArray* _out; - - if (!SWIG_check_num_args("doubleArray_paren_asgn", argc, 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_doubleArray, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "doubleArray_paren_asgn" - "', argument " - "1" - " of type '" - "doubleArray *" - "'"); - } - arg1 = reinterpret_cast(argp1); - ecode2 = SWIG_AsVal_size_t(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "doubleArray_paren_asgn" - "', argument " - "2" - " of type '" - "size_t" - "'"); - } - arg2 = static_cast(val2); - ecode3 = SWIG_AsVal_double(argv[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "doubleArray_paren_asgn" - "', argument " - "3" - " of type '" - "double" - "'"); - } - arg3 = static_cast(val3); - doubleArray_paren_asgn(arg1, arg2, arg3); - _out = (mxArray*)0; - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_doubleArray_cast(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - doubleArray* arg1 = (doubleArray*)0; - void* argp1 = 0; - int res1 = 0; - mxArray* _out; - double* result = 0; - - if (!SWIG_check_num_args("doubleArray_cast", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_doubleArray, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "doubleArray_cast" - "', argument " - "1" - " of type '" - "doubleArray *" - "'"); - } - arg1 = reinterpret_cast(argp1); - result = (double*)doubleArray_cast(arg1); - _out = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_doubleArray_frompointer(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - double* arg1 = (double*)0; - void* argp1 = 0; - int res1 = 0; - mxArray* _out; - doubleArray* result = 0; - - if (!SWIG_check_num_args("doubleArray_frompointer", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "doubleArray_frompointer" - "', argument " - "1" - " of type '" - "double *" - "'"); - } - arg1 = reinterpret_cast(argp1); - result = (doubleArray*)doubleArray_frompointer(arg1); - _out = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_doubleArray, 0 | 0); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationGetResults__SWIG_0(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - char* arg2 = (char*)0; - double* arg3; - int arg4; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - void* argp3 = 0; - int res3 = 0; - int val4; - int ecode4 = 0; - mxArray* _out; - int result; - - if (!SWIG_check_num_args("gridDynSimulationGetResults", argc, 4, 4, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationGetResults" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "gridDynSimulationGetResults" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationGetResults" - "', argument " - "3" - " of type '" - "double [0]" - "'"); - } - arg3 = reinterpret_cast(argp3); - ecode4 = SWIG_AsVal_int(argv[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), - "in method '" - "gridDynSimulationGetResults" - "', argument " - "4" - " of type '" - "int" - "'"); - } - arg4 = static_cast(val4); - result = (int)gridDynSimulationGetResults(arg1, (char const*)arg2, arg3, arg4); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 1; -} - -int _wrap_GridDynObject_create(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - char* arg1 = (char*)0; - char* arg2 = (char*)0; - int res1; - char* buf1 = 0; - int alloc1 = 0; - int res2; - char* buf2 = 0; - int alloc2 = 0; - mxArray* _out; - GridDynObject result; - - if (!SWIG_check_num_args("GridDynObjectCreate", argc, 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectCreate" - "', argument " - "1" - " of type '" - "char const *" - "'"); - } - arg1 = reinterpret_cast(buf1); - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectCreate" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - result = (GridDynObject)GridDynObjectCreate((char const*)arg1, (char const*)arg2); - _out = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_out) --resc, *resv++ = _out; - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 0; -fail: - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 1; -} - -int _wrap_GridDynObject_clone(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)(GridDynObject)0; - int res1; - mxArray* _out; - GridDynObject result; - - if (!SWIG_check_num_args("GridDynObjectClone", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectClone" - "', argument " - "1" - " of type '" - "GridDynObject const" - "'"); - } - result = (GridDynObject)GridDynObjectClone(arg1); - _out = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynObject_free(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)0; - int res1; - mxArray* _out; - - if (!SWIG_check_num_args("GridDynObjectFree", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectFree" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - GridDynObjectFree(arg1); - _out = (mxArray*)0; - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynObject_add(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)0; - GridDynObject arg2 = (GridDynObject)0; - int res1; - int res2; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectAdd", argc, 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectAdd" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectAdd" - "', argument " - "2" - " of type '" - "GridDynObject" - "'"); - } - result = (griddyn_status)GridDynObjectAdd(arg1, arg2); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynObject_remove(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)0; - GridDynObject arg2 = (GridDynObject)0; - int res1; - int res2; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectRemove", argc, 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectRemove" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectRemove" - "', argument " - "2" - " of type '" - "GridDynObject" - "'"); - } - result = (griddyn_status)GridDynObjectRemove(arg1, arg2); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynObject_setString(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)0; - char* arg2 = (char*)0; - char* arg3 = (char*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - int res3; - char* buf3 = 0; - int alloc3 = 0; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectSetString", argc, 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectSetString" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectSetString" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynObjectSetString" - "', argument " - "3" - " of type '" - "char const *" - "'"); - } - arg3 = reinterpret_cast(buf3); - result = (griddyn_status)GridDynObjectSetString(arg1, (char const*)arg2, (char const*)arg3); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return 1; -} - -int _wrap_GridDynObject_setValue(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)0; - char* arg2 = (char*)0; - double arg3; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - double val3; - int ecode3 = 0; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectSetValue", argc, 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectSetValue" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectSetValue" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - ecode3 = SWIG_AsVal_double(argv[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectSetValue" - "', argument " - "3" - " of type '" - "double" - "'"); - } - arg3 = static_cast(val3); - result = (griddyn_status)GridDynObjectSetValue(arg1, (char const*)arg2, arg3); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 1; -} - -int _wrap_GridDynObject_setValueUnits(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)0; - char* arg2 = (char*)0; - double arg3; - char* arg4 = (char*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - double val3; - int ecode3 = 0; - int res4; - char* buf4 = 0; - int alloc4 = 0; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectSetValueUnits", argc, 4, 4, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectSetValueUnits" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectSetValueUnits" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - ecode3 = SWIG_AsVal_double(argv[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectSetValueUnits" - "', argument " - "3" - " of type '" - "double" - "'"); - } - arg3 = static_cast(val3); - res4 = SWIG_AsCharPtrAndSize(argv[3], &buf4, NULL, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "GridDynObjectSetValueUnits" - "', argument " - "4" - " of type '" - "char const *" - "'"); - } - arg4 = reinterpret_cast(buf4); - result = (griddyn_status) - GridDynObjectSetValueUnits(arg1, (char const*)arg2, arg3, (char const*)arg4); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc4 == SWIG_NEWOBJ) delete[] buf4; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc4 == SWIG_NEWOBJ) delete[] buf4; - return 1; -} - -int _wrap_GridDynObject_setFlag(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)0; - char* arg2 = (char*)0; - int arg3; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - int val3; - int ecode3 = 0; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectSetFlag", argc, 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectSetFlag" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectSetFlag" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - ecode3 = SWIG_AsVal_int(argv[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectSetFlag" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - result = (griddyn_status)GridDynObjectSetFlag(arg1, (char const*)arg2, arg3); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 1; -} - -int _wrap_GridDynObject_getString(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)(GridDynObject)0; - char* arg2 = (char*)0; - char* arg3 = (char*)0; - int arg4; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - int res3; - char* buf3 = 0; - int alloc3 = 0; - int val4; - int ecode4 = 0; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectGetString", argc, 4, 4, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectGetString" - "', argument " - "1" - " of type '" - "GridDynObject const" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectGetString" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynObjectGetString" - "', argument " - "3" - " of type '" - "char *" - "'"); - } - arg3 = reinterpret_cast(buf3); - ecode4 = SWIG_AsVal_int(argv[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), - "in method '" - "GridDynObjectGetString" - "', argument " - "4" - " of type '" - "int" - "'"); - } - arg4 = static_cast(val4); - result = (griddyn_status)GridDynObjectGetString(arg1, (char const*)arg2, arg3, arg4); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return 1; -} - -int _wrap_GridDynObject_getValue(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)(GridDynObject)0; - char* arg2 = (char*)0; - double* arg3 = (double*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - void* argp3 = 0; - int res3 = 0; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectGetValue", argc, 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectGetValue" - "', argument " - "1" - " of type '" - "GridDynObject const" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectGetValue" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynObjectGetValue" - "', argument " - "3" - " of type '" - "double *" - "'"); - } - arg3 = reinterpret_cast(argp3); - result = (griddyn_status)GridDynObjectGetValue(arg1, (char const*)arg2, arg3); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 1; -} - -int _wrap_GridDynObject_getValueUnits(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)(GridDynObject)0; - char* arg2 = (char*)0; - char* arg3 = (char*)0; - double* arg4 = (double*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - int res3; - char* buf3 = 0; - int alloc3 = 0; - void* argp4 = 0; - int res4 = 0; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectGetValueUnits", argc, 4, 4, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectGetValueUnits" - "', argument " - "1" - " of type '" - "GridDynObject const" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectGetValueUnits" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynObjectGetValueUnits" - "', argument " - "3" - " of type '" - "char const *" - "'"); - } - arg3 = reinterpret_cast(buf3); - res4 = SWIG_ConvertPtr(argv[3], &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "GridDynObjectGetValueUnits" - "', argument " - "4" - " of type '" - "double *" - "'"); - } - arg4 = reinterpret_cast(argp4); - result = (griddyn_status) - GridDynObjectGetValueUnits(arg1, (char const*)arg2, (char const*)arg3, arg4); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return 1; -} - -int _wrap_GridDynObject_getFlag(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)(GridDynObject)0; - char* arg2 = (char*)0; - int* arg3 = (int*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - void* argp3 = 0; - int res3 = 0; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectGetFlag", argc, 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectGetFlag" - "', argument " - "1" - " of type '" - "GridDynObject const" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectGetFlag" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_int, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynObjectGetFlag" - "', argument " - "3" - " of type '" - "int *" - "'"); - } - arg3 = reinterpret_cast(argp3); - result = (griddyn_status)GridDynObjectGetFlag(arg1, (char const*)arg2, arg3); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 1; -} - -int _wrap_GridDynObject_find(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)(GridDynObject)0; - char* arg2 = (char*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - mxArray* _out; - GridDynObject result; - - if (!SWIG_check_num_args("GridDynObjectFind", argc, 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectFind" - "', argument " - "1" - " of type '" - "GridDynObject const" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectFind" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - result = (GridDynObject)GridDynObjectFind(arg1, (char const*)arg2); - _out = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 1; -} - -int _wrap_GridDynObject_getSubObject(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)(GridDynObject)0; - char* arg2 = (char*)0; - int arg3; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - int val3; - int ecode3 = 0; - mxArray* _out; - GridDynObject result; - - if (!SWIG_check_num_args("GridDynObjectGetSubObject", argc, 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectGetSubObject" - "', argument " - "1" - " of type '" - "GridDynObject const" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectGetSubObject" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - ecode3 = SWIG_AsVal_int(argv[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectGetSubObject" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - result = (GridDynObject)GridDynObjectGetSubObject(arg1, (char const*)arg2, arg3); - _out = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 1; -} - -int _wrap_GridDynObject_findByUserId(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)(GridDynObject)0; - char* arg2 = (char*)0; - int arg3; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - int val3; - int ecode3 = 0; - mxArray* _out; - GridDynObject result; - - if (!SWIG_check_num_args("GridDynObjectFindByUserId", argc, 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectFindByUserId" - "', argument " - "1" - " of type '" - "GridDynObject const" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectFindByUserId" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - ecode3 = SWIG_AsVal_int(argv[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectFindByUserId" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - result = (GridDynObject)GridDynObjectFindByUserId(arg1, (char const*)arg2, arg3); - _out = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 1; -} - -int _wrap_GridDynObject_getParent(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)(GridDynObject)0; - int res1; - mxArray* _out; - GridDynObject result; - - if (!SWIG_check_num_args("GridDynObjectGetParent", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectGetParent" - "', argument " - "1" - " of type '" - "GridDynObject const" - "'"); - } - result = (GridDynObject)GridDynObjectGetParent(arg1); - _out = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynObject_getType(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)(GridDynObject)0; - int res1; - mxArray* _out; - char* result = 0; - - if (!SWIG_check_num_args("GridDynObjectGetType", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectGetType" - "', argument " - "1" - " of type '" - "GridDynObject const" - "'"); - } - result = (char*)GridDynObjectGetType(arg1); - _out = SWIG_FromCharPtr((const char*)result); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationCreate(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - char* arg1 = (char*)0; - char* arg2 = (char*)0; - int res1; - char* buf1 = 0; - int alloc1 = 0; - int res2; - char* buf2 = 0; - int alloc2 = 0; - mxArray* _out; - GridDynSimulation result; - - if (!SWIG_check_num_args("gridDynSimulationCreate", argc, 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationCreate" - "', argument " - "1" - " of type '" - "char const *" - "'"); - } - arg1 = reinterpret_cast(buf1); - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "gridDynSimulationCreate" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - result = (GridDynSimulation)gridDynSimulationCreate((char const*)arg1, (char const*)arg2); - _out = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_out) --resc, *resv++ = _out; - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 0; -fail: - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 1; -} - -int _wrap_gridDynSimulationFree(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - mxArray* _out; - - if (!SWIG_check_num_args("gridDynSimulationFree", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationFree" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - gridDynSimulationFree(arg1); - _out = (mxArray*)0; - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationInitializeFromString(int resc, - mxArray* resv[], - int argc, - mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - char* arg2 = (char*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationInitializeFromString", argc, 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationInitializeFromString" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "gridDynSimulationInitializeFromString" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - result = (griddyn_status)gridDynSimulationInitializeFromString(arg1, (char const*)arg2); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 1; -} - -int _wrap_gridDynSimulationInitializeFromArgs(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int arg2; - char** arg3; - int arg4; - int res1; - int val2; - int ecode2 = 0; - void* argp3 = 0; - int res3 = 0; - int val4; - int ecode4 = 0; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationInitializeFromArgs", argc, 4, 4, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationInitializeFromArgs" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - ecode2 = SWIG_AsVal_int(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "gridDynSimulationInitializeFromArgs" - "', argument " - "2" - " of type '" - "int" - "'"); - } - arg2 = static_cast(val2); - res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_p_char, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationInitializeFromArgs" - "', argument " - "3" - " of type '" - "char *[]" - "'"); - } - arg3 = reinterpret_cast(argp3); - ecode4 = SWIG_AsVal_int(argv[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), - "in method '" - "gridDynSimulationInitializeFromArgs" - "', argument " - "4" - " of type '" - "int" - "'"); - } - arg4 = static_cast(val4); - result = (griddyn_status)gridDynSimulationInitializeFromArgs(arg1, arg2, arg3, arg4); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationLoadfile(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - char* arg2 = (char*)0; - char* arg3 = (char*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - int res3; - char* buf3 = 0; - int alloc3 = 0; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationLoadfile", argc, 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationLoadfile" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "gridDynSimulationLoadfile" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationLoadfile" - "', argument " - "3" - " of type '" - "char const *" - "'"); - } - arg3 = reinterpret_cast(buf3); - result = (griddyn_status)gridDynSimulationLoadfile(arg1, (char const*)arg2, (char const*)arg3); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return 1; -} - -int _wrap_gridDynSimulationAddCommand(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - char* arg2 = (char*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationAddCommand", argc, 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationAddCommand" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "gridDynSimulationAddCommand" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - result = (griddyn_status)gridDynSimulationAddCommand(arg1, (char const*)arg2); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 1; -} - -int _wrap_gridDynSimulationPowerflowInitialize(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationPowerflowInitialize", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationPowerflowInitialize" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (griddyn_status)gridDynSimulationPowerflowInitialize(arg1); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationPowerflow(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationPowerflow", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationPowerflow" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (griddyn_status)gridDynSimulationPowerflow(arg1); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationDynamicInitialize(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationDynamicInitialize", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationDynamicInitialize" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (griddyn_status)gridDynSimulationDynamicInitialize(arg1); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationReset(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationReset", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationReset" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (griddyn_status)gridDynSimulationReset(arg1); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationGetCurrentTime(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - mxArray* _out; - double result; - - if (!SWIG_check_num_args("gridDynSimulationGetCurrentTime", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationGetCurrentTime" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (double)gridDynSimulationGetCurrentTime(arg1); - _out = SWIG_From_double(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationRun(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationRun", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationRun" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (griddyn_status)gridDynSimulationRun(arg1); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationRunTo(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - double arg2; - int res1; - double val2; - int ecode2 = 0; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationRunTo", argc, 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationRunTo" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - ecode2 = SWIG_AsVal_double(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "gridDynSimulationRunTo" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - result = (griddyn_status)gridDynSimulationRunTo(arg1, arg2); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationStep(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationStep", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationStep" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (griddyn_status)gridDynSimulationStep(arg1); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationRunAsync(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationRunAsync", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationRunAsync" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (griddyn_status)gridDynSimulationRunAsync(arg1); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationRunToAsync(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - double arg2; - int res1; - double val2; - int ecode2 = 0; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationRunToAsync", argc, 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationRunToAsync" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - ecode2 = SWIG_AsVal_double(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "gridDynSimulationRunToAsync" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - result = (griddyn_status)gridDynSimulationRunToAsync(arg1, arg2); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationStepAsync(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationStepAsync", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationStepAsync" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (griddyn_status)gridDynSimulationStepAsync(arg1); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationGetStatus(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - mxArray* _out; - int result; - - if (!SWIG_check_num_args("gridDynSimulationGetStatus", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationGetStatus" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (int)gridDynSimulationGetStatus(arg1); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_getSimulationObject(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - mxArray* _out; - GridDynObject result; - - if (!SWIG_check_num_args("getSimulationObject", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "getSimulationObject" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (GridDynObject)getSimulationObject(arg1); - _out = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationGetSolverKey(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - char* arg2 = (char*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - mxArray* _out; - SolverKey result; - - if (!SWIG_check_num_args("gridDynSimulationGetSolverKey", argc, 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationGetSolverKey" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "gridDynSimulationGetSolverKey" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - result = (SolverKey)gridDynSimulationGetSolverKey(arg1, (char const*)arg2); - _out = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 1; -} - -int _wrap_gridDynSolverKeyFree(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - SolverKey arg1 = (SolverKey)0; - int res1; - mxArray* _out; - - if (!SWIG_check_num_args("gridDynSolverKeyFree", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSolverKeyFree" - "', argument " - "1" - " of type '" - "SolverKey" - "'"); - } - gridDynSolverKeyFree(arg1); - _out = (mxArray*)0; - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationStateSize(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - SolverKey arg2 = (SolverKey)0; - int res1; - int res2; - mxArray* _out; - int result; - - if (!SWIG_check_num_args("gridDynSimulationStateSize", argc, 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationStateSize" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - res2 = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "gridDynSimulationStateSize" - "', argument " - "2" - " of type '" - "SolverKey" - "'"); - } - result = (int)gridDynSimulationStateSize(arg1, arg2); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationBusCount(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - mxArray* _out; - int result; - - if (!SWIG_check_num_args("gridDynSimulationBusCount", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationBusCount" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (int)gridDynSimulationBusCount(arg1); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationLineCount(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - mxArray* _out; - int result; - - if (!SWIG_check_num_args("gridDynSimulationLineCount", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationLineCount" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (int)gridDynSimulationLineCount(arg1); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationGetResults__SWIG_1(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - char* arg2 = (char*)0; - double* arg3 = (double*)0; - int arg4; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - void* argp3 = 0; - int res3 = 0; - int val4; - int ecode4 = 0; - mxArray* _out; - int result; - - if (!SWIG_check_num_args("gridDynSimulationGetResults", argc, 4, 4, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationGetResults" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "gridDynSimulationGetResults" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationGetResults" - "', argument " - "3" - " of type '" - "double *" - "'"); - } - arg3 = reinterpret_cast(argp3); - ecode4 = SWIG_AsVal_int(argv[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), - "in method '" - "gridDynSimulationGetResults" - "', argument " - "4" - " of type '" - "int" - "'"); - } - arg4 = static_cast(val4); - result = (int)gridDynSimulationGetResults(arg1, (char const*)arg2, arg3, arg4); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 1; -} - -int _wrap_gridDynSimulationGetResults(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - if (argc == 4) { - int _v; - void* ptr = 0; - int res = SWIG_ConvertPtr(argv[0], &ptr, 0, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - void* vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_gridDynSimulationGetResults__SWIG_0(resc, resv, argc, argv); - } - } - } - } - } - if (argc == 4) { - int _v; - void* ptr = 0; - int res = SWIG_ConvertPtr(argv[0], &ptr, 0, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - void* vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_gridDynSimulationGetResults__SWIG_1(resc, resv, argc, argv); - } - } - } - } - } - - SWIG_Error(SWIG_RuntimeError, - "No matching function for overload function 'gridDynSimulationGetResults'." - " Possible C/C++ prototypes are:\n" - " gridDynSimulationGetResults(GridDynSimulation,char const *,double [0],int)\n" - " gridDynSimulationGetResults(GridDynSimulation,char const *,double *,int)\n"); - return 1; -} - -int _wrap_gridDynSimulationGuessState(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - double arg2; - double* arg3 = (double*)0; - double* arg4 = (double*)0; - SolverKey arg5 = (SolverKey)0; - int res1; - double val2; - int ecode2 = 0; - void* argp3 = 0; - int res3 = 0; - void* argp4 = 0; - int res4 = 0; - int res5; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationGuessState", argc, 5, 5, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationGuessState" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - ecode2 = SWIG_AsVal_double(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "gridDynSimulationGuessState" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationGuessState" - "', argument " - "3" - " of type '" - "double *" - "'"); - } - arg3 = reinterpret_cast(argp3); - res4 = SWIG_ConvertPtr(argv[3], &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "gridDynSimulationGuessState" - "', argument " - "4" - " of type '" - "double *" - "'"); - } - arg4 = reinterpret_cast(argp4); - res5 = SWIG_ConvertPtr(argv[4], SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), - "in method '" - "gridDynSimulationGuessState" - "', argument " - "5" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status)gridDynSimulationGuessState(arg1, arg2, arg3, arg4, arg5); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationSetState(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - double arg2; - double* arg3 = (double*)0; - double* arg4 = (double*)0; - SolverKey arg5 = (SolverKey)0; - int res1; - double val2; - int ecode2 = 0; - void* argp3 = 0; - int res3 = 0; - void* argp4 = 0; - int res4 = 0; - int res5; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationSetState", argc, 5, 5, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationSetState" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - ecode2 = SWIG_AsVal_double(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "gridDynSimulationSetState" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationSetState" - "', argument " - "3" - " of type '" - "double const *" - "'"); - } - arg3 = reinterpret_cast(argp3); - res4 = SWIG_ConvertPtr(argv[3], &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "gridDynSimulationSetState" - "', argument " - "4" - " of type '" - "double const *" - "'"); - } - arg4 = reinterpret_cast(argp4); - res5 = SWIG_ConvertPtr(argv[4], SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), - "in method '" - "gridDynSimulationSetState" - "', argument " - "5" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status) - gridDynSimulationSetState(arg1, arg2, (double const*)arg3, (double const*)arg4, arg5); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationGetStateVariableTypes(int resc, - mxArray* resv[], - int argc, - mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - double* arg2 = (double*)0; - SolverKey arg3 = (SolverKey)0; - int res1; - void* argp2 = 0; - int res2 = 0; - int res3; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationGetStateVariableTypes", argc, 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationGetStateVariableTypes" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "gridDynSimulationGetStateVariableTypes" - "', argument " - "2" - " of type '" - "double *" - "'"); - } - arg2 = reinterpret_cast(argp2); - res3 = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&arg3), 0, 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationGetStateVariableTypes" - "', argument " - "3" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status)gridDynSimulationGetStateVariableTypes(arg1, arg2, arg3); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationResidual(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - double arg2; - double* arg3 = (double*)0; - double* arg4 = (double*)0; - double* arg5 = (double*)0; - SolverKey arg6 = (SolverKey)0; - int res1; - double val2; - int ecode2 = 0; - void* argp3 = 0; - int res3 = 0; - void* argp4 = 0; - int res4 = 0; - void* argp5 = 0; - int res5 = 0; - int res6; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationResidual", argc, 6, 6, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationResidual" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - ecode2 = SWIG_AsVal_double(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "gridDynSimulationResidual" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationResidual" - "', argument " - "3" - " of type '" - "double *" - "'"); - } - arg3 = reinterpret_cast(argp3); - res4 = SWIG_ConvertPtr(argv[3], &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "gridDynSimulationResidual" - "', argument " - "4" - " of type '" - "double const *" - "'"); - } - arg4 = reinterpret_cast(argp4); - res5 = SWIG_ConvertPtr(argv[4], &argp5, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), - "in method '" - "gridDynSimulationResidual" - "', argument " - "5" - " of type '" - "double const *" - "'"); - } - arg5 = reinterpret_cast(argp5); - res6 = SWIG_ConvertPtr(argv[5], SWIG_as_voidptrptr(&arg6), 0, 0); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), - "in method '" - "gridDynSimulationResidual" - "', argument " - "6" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status) - gridDynSimulationResidual(arg1, arg2, arg3, (double const*)arg4, (double const*)arg5, arg6); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationDerivative(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - double arg2; - double* arg3 = (double*)0; - double* arg4 = (double*)0; - SolverKey arg5 = (SolverKey)0; - int res1; - double val2; - int ecode2 = 0; - void* argp3 = 0; - int res3 = 0; - void* argp4 = 0; - int res4 = 0; - int res5; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationDerivative", argc, 5, 5, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationDerivative" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - ecode2 = SWIG_AsVal_double(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "gridDynSimulationDerivative" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationDerivative" - "', argument " - "3" - " of type '" - "double *" - "'"); - } - arg3 = reinterpret_cast(argp3); - res4 = SWIG_ConvertPtr(argv[3], &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "gridDynSimulationDerivative" - "', argument " - "4" - " of type '" - "double const *" - "'"); - } - arg4 = reinterpret_cast(argp4); - res5 = SWIG_ConvertPtr(argv[4], SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), - "in method '" - "gridDynSimulationDerivative" - "', argument " - "5" - " of type '" - "SolverKey" - "'"); - } - result = - (griddyn_status)gridDynSimulationDerivative(arg1, arg2, arg3, (double const*)arg4, arg5); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationAlgebraicUpdate(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - double arg2; - double* arg3 = (double*)0; - double* arg4 = (double*)0; - double arg5; - SolverKey arg6 = (SolverKey)0; - int res1; - double val2; - int ecode2 = 0; - void* argp3 = 0; - int res3 = 0; - void* argp4 = 0; - int res4 = 0; - double val5; - int ecode5 = 0; - int res6; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationAlgebraicUpdate", argc, 6, 6, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationAlgebraicUpdate" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - ecode2 = SWIG_AsVal_double(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "gridDynSimulationAlgebraicUpdate" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationAlgebraicUpdate" - "', argument " - "3" - " of type '" - "double *" - "'"); - } - arg3 = reinterpret_cast(argp3); - res4 = SWIG_ConvertPtr(argv[3], &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "gridDynSimulationAlgebraicUpdate" - "', argument " - "4" - " of type '" - "double const *" - "'"); - } - arg4 = reinterpret_cast(argp4); - ecode5 = SWIG_AsVal_double(argv[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), - "in method '" - "gridDynSimulationAlgebraicUpdate" - "', argument " - "5" - " of type '" - "double" - "'"); - } - arg5 = static_cast(val5); - res6 = SWIG_ConvertPtr(argv[5], SWIG_as_voidptrptr(&arg6), 0, 0); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), - "in method '" - "gridDynSimulationAlgebraicUpdate" - "', argument " - "6" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status) - gridDynSimulationAlgebraicUpdate(arg1, arg2, arg3, (double const*)arg4, arg5, arg6); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_gridDynSimulationJacobian(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - double arg2; - double* arg3 = (double*)0; - double* arg4 = (double*)0; - double arg5; - SolverKey arg6 = (SolverKey)0; - void (*arg7)(int, int, double) = (void (*)(int, int, double))0; - int res1; - double val2; - int ecode2 = 0; - void* argp3 = 0; - int res3 = 0; - void* argp4 = 0; - int res4 = 0; - double val5; - int ecode5 = 0; - int res6; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationJacobian", argc, 7, 7, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationJacobian" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - ecode2 = SWIG_AsVal_double(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "gridDynSimulationJacobian" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationJacobian" - "', argument " - "3" - " of type '" - "double const *" - "'"); - } - arg3 = reinterpret_cast(argp3); - res4 = SWIG_ConvertPtr(argv[3], &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "gridDynSimulationJacobian" - "', argument " - "4" - " of type '" - "double const *" - "'"); - } - arg4 = reinterpret_cast(argp4); - ecode5 = SWIG_AsVal_double(argv[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), - "in method '" - "gridDynSimulationJacobian" - "', argument " - "5" - " of type '" - "double" - "'"); - } - arg5 = static_cast(val5); - res6 = SWIG_ConvertPtr(argv[5], SWIG_as_voidptrptr(&arg6), 0, 0); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), - "in method '" - "gridDynSimulationJacobian" - "', argument " - "6" - " of type '" - "SolverKey" - "'"); - } - { - int res = - SWIG_ConvertFunctionPtr(argv[6], (void**)(&arg7), SWIGTYPE_p_f_int_int_double__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), - "in method '" - "gridDynSimulationJacobian" - "', argument " - "7" - " of type '" - "void (*)(int,int,double)" - "'"); - } - } - result = (griddyn_status)gridDynSimulationJacobian( - arg1, arg2, (double const*)arg3, (double const*)arg4, arg5, arg6, arg7); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynSingleQuery_create(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)0; - char* arg2 = (char*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - mxArray* _out; - GridDynSingleQuery result; - - if (!SWIG_check_num_args("GridDynSingleQueryCreate", argc, 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynSingleQueryCreate" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynSingleQueryCreate" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - result = (GridDynSingleQuery)GridDynSingleQueryCreate(arg1, (char const*)arg2); - _out = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 1; -} - -int _wrap_GridDynVectorQuery_create(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)0; - char* arg2 = (char*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - mxArray* _out; - GridDynVectorQuery result; - - if (!SWIG_check_num_args("GridDynVectorQueryCreate", argc, 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynVectorQueryCreate" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynVectorQueryCreate" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - result = (GridDynVectorQuery)GridDynVectorQueryCreate(arg1, (char const*)arg2); - _out = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 1; -} - -int _wrap_GridDynSingleQuery_free(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSingleQuery arg1 = (GridDynSingleQuery)0; - int res1; - mxArray* _out; - - if (!SWIG_check_num_args("GridDynSingleQueryFree", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynSingleQueryFree" - "', argument " - "1" - " of type '" - "GridDynSingleQuery" - "'"); - } - GridDynSingleQueryFree(arg1); - _out = (mxArray*)0; - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynVectorQuery_free(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynVectorQuery arg1 = (GridDynVectorQuery)0; - int res1; - mxArray* _out; - - if (!SWIG_check_num_args("GridDynVectorQueryFree", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynVectorQueryFree" - "', argument " - "1" - " of type '" - "GridDynVectorQuery" - "'"); - } - GridDynVectorQueryFree(arg1); - _out = (mxArray*)0; - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynSingleQuery_run(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSingleQuery arg1 = (GridDynSingleQuery)0; - int res1; - mxArray* _out; - double result; - - if (!SWIG_check_num_args("GridDynSingleQueryRun", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynSingleQueryRun" - "', argument " - "1" - " of type '" - "GridDynSingleQuery" - "'"); - } - result = (double)GridDynSingleQueryRun(arg1); - _out = SWIG_From_double(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynVectorQuery_run(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynVectorQuery arg1 = (GridDynVectorQuery)0; - double* arg2 = (double*)0; - int arg3; - int res1; - void* argp2 = 0; - int res2 = 0; - int val3; - int ecode3 = 0; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynVectorQueryRun", argc, 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynVectorQueryRun" - "', argument " - "1" - " of type '" - "GridDynVectorQuery" - "'"); - } - res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynVectorQueryRun" - "', argument " - "2" - " of type '" - "double *" - "'"); - } - arg2 = reinterpret_cast(argp2); - ecode3 = SWIG_AsVal_int(argv[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynVectorQueryRun" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - result = (griddyn_status)GridDynVectorQueryRun(arg1, arg2, arg3); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynVectorQuery_append(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynVectorQuery arg1 = (GridDynVectorQuery)0; - GridDynObject arg2 = (GridDynObject)0; - char* arg3 = (char*)0; - int res1; - int res2; - int res3; - char* buf3 = 0; - int alloc3 = 0; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynVectorQueryAppend", argc, 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynVectorQueryAppend" - "', argument " - "1" - " of type '" - "GridDynVectorQuery" - "'"); - } - res2 = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynVectorQueryAppend" - "', argument " - "2" - " of type '" - "GridDynObject" - "'"); - } - res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynVectorQueryAppend" - "', argument " - "3" - " of type '" - "char const *" - "'"); - } - arg3 = reinterpret_cast(buf3); - result = (griddyn_status)GridDynVectorQueryAppend(arg1, arg2, (char const*)arg3); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return 0; -fail: - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return 1; -} - -int _wrap_GridDynSingleQuery_update(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynSingleQuery arg1 = (GridDynSingleQuery)0; - GridDynObject arg2 = (GridDynObject)0; - char* arg3 = (char*)0; - int res1; - int res2; - int res3; - char* buf3 = 0; - int alloc3 = 0; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynSingleQueryUpdate", argc, 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynSingleQueryUpdate" - "', argument " - "1" - " of type '" - "GridDynSingleQuery" - "'"); - } - res2 = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynSingleQueryUpdate" - "', argument " - "2" - " of type '" - "GridDynObject" - "'"); - } - res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynSingleQueryUpdate" - "', argument " - "3" - " of type '" - "char const *" - "'"); - } - arg3 = reinterpret_cast(buf3); - result = (griddyn_status)GridDynSingleQueryUpdate(arg1, arg2, (char const*)arg3); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return 0; -fail: - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return 1; -} - -int _wrap_GridDynVectorQuery_update(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynVectorQuery arg1 = (GridDynVectorQuery)0; - GridDynObject arg2 = (GridDynObject)0; - char* arg3 = (char*)0; - int res1; - int res2; - int res3; - char* buf3 = 0; - int alloc3 = 0; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynVectorQueryUpdate", argc, 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynVectorQueryUpdate" - "', argument " - "1" - " of type '" - "GridDynVectorQuery" - "'"); - } - res2 = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynVectorQueryUpdate" - "', argument " - "2" - " of type '" - "GridDynObject" - "'"); - } - res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynVectorQueryUpdate" - "', argument " - "3" - " of type '" - "char const *" - "'"); - } - arg3 = reinterpret_cast(buf3); - result = (griddyn_status)GridDynVectorQueryUpdate(arg1, arg2, (char const*)arg3); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return 0; -fail: - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return 1; -} - -int _wrap_GridDynEvent_create(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - char* arg1 = (char*)0; - GridDynObject arg2 = (GridDynObject)0; - int res1; - char* buf1 = 0; - int alloc1 = 0; - int res2; - mxArray* _out; - GridDynEvent result; - - if (!SWIG_check_num_args("GridDynEventCreate", argc, 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynEventCreate" - "', argument " - "1" - " of type '" - "char const *" - "'"); - } - arg1 = reinterpret_cast(buf1); - res2 = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynEventCreate" - "', argument " - "2" - " of type '" - "GridDynObject" - "'"); - } - result = (GridDynEvent)GridDynEventCreate((char const*)arg1, arg2); - _out = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_out) --resc, *resv++ = _out; - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return 0; -fail: - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return 1; -} - -int _wrap_GridDynEvent_free(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynEvent arg1 = (GridDynEvent)0; - int res1; - mxArray* _out; - - if (!SWIG_check_num_args("GridDynEventFree", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynEventFree" - "', argument " - "1" - " of type '" - "GridDynEvent" - "'"); - } - GridDynEventFree(arg1); - _out = (mxArray*)0; - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynEvent_trigger(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynEvent arg1 = (GridDynEvent)0; - int res1; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynEventTrigger", argc, 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynEventTrigger" - "', argument " - "1" - " of type '" - "GridDynEvent" - "'"); - } - result = (griddyn_status)GridDynEventTrigger(arg1); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynEvent_schedule(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynEvent arg1 = (GridDynEvent)0; - GridDynSimulation arg2 = (GridDynSimulation)0; - int res1; - int res2; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynEventSchedule", argc, 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynEventSchedule" - "', argument " - "1" - " of type '" - "GridDynEvent" - "'"); - } - res2 = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynEventSchedule" - "', argument " - "2" - " of type '" - "GridDynSimulation" - "'"); - } - result = (griddyn_status)GridDynEventSchedule(arg1, arg2); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynEvent_setValue(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynEvent arg1 = (GridDynEvent)0; - char* arg2 = (char*)0; - double arg3; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - double val3; - int ecode3 = 0; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynEventSetValue", argc, 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynEventSetValue" - "', argument " - "1" - " of type '" - "GridDynEvent" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynEventSetValue" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - ecode3 = SWIG_AsVal_double(argv[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynEventSetValue" - "', argument " - "3" - " of type '" - "double" - "'"); - } - arg3 = static_cast(val3); - result = (griddyn_status)GridDynEventSetValue(arg1, (char const*)arg2, arg3); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 1; -} - -int _wrap_GridDynEvent_setString(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynEvent arg1 = (GridDynEvent)0; - char* arg2 = (char*)0; - char* arg3 = (char*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - int res3; - char* buf3 = 0; - int alloc3 = 0; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynEventSetString", argc, 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynEventSetString" - "', argument " - "1" - " of type '" - "GridDynEvent" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynEventSetString" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynEventSetString" - "', argument " - "3" - " of type '" - "char const *" - "'"); - } - arg3 = reinterpret_cast(buf3); - result = (griddyn_status)GridDynEventSetString(arg1, (char const*)arg2, (char const*)arg3); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return 1; -} - -int _wrap_GridDynEvent_setFlag(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynEvent arg1 = (GridDynEvent)0; - char* arg2 = (char*)0; - int arg3; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - int val3; - int ecode3 = 0; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynEventSetFlag", argc, 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynEventSetFlag" - "', argument " - "1" - " of type '" - "GridDynEvent" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynEventSetFlag" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - ecode3 = SWIG_AsVal_int(argv[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynEventSetFlag" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - result = (griddyn_status)GridDynEventSetFlag(arg1, (char const*)arg2, arg3); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 0; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return 1; -} - -int _wrap_GridDynEvent_setTarget(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynEvent arg1 = (GridDynEvent)0; - GridDynObject arg2 = (GridDynObject)0; - int res1; - int res2; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynEventSetTarget", argc, 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynEventSetTarget" - "', argument " - "1" - " of type '" - "GridDynEvent" - "'"); - } - res2 = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynEventSetTarget" - "', argument " - "2" - " of type '" - "GridDynObject" - "'"); - } - result = (griddyn_status)GridDynEventSetTarget(arg1, arg2); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynObject_stateSize(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)0; - SolverKey arg2 = (SolverKey)0; - int res1; - int res2; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectStateSize", argc, 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectStateSize" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_ConvertPtr(argv[1], SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectStateSize" - "', argument " - "2" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status)GridDynObjectStateSize(arg1, arg2); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynObject_guessState(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)0; - double arg2; - double* arg3 = (double*)0; - double* arg4 = (double*)0; - SolverKey arg5 = (SolverKey)0; - int res1; - double val2; - int ecode2 = 0; - void* argp3 = 0; - int res3 = 0; - void* argp4 = 0; - int res4 = 0; - int res5; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectGuessState", argc, 5, 5, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectGuessState" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - ecode2 = SWIG_AsVal_double(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "GridDynObjectGuessState" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynObjectGuessState" - "', argument " - "3" - " of type '" - "double *" - "'"); - } - arg3 = reinterpret_cast(argp3); - res4 = SWIG_ConvertPtr(argv[3], &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "GridDynObjectGuessState" - "', argument " - "4" - " of type '" - "double *" - "'"); - } - arg4 = reinterpret_cast(argp4); - res5 = SWIG_ConvertPtr(argv[4], SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), - "in method '" - "GridDynObjectGuessState" - "', argument " - "5" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status)GridDynObjectGuessState(arg1, arg2, arg3, arg4, arg5); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynObject_setState(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)0; - double arg2; - double* arg3 = (double*)0; - double* arg4 = (double*)0; - SolverKey arg5 = (SolverKey)0; - int res1; - double val2; - int ecode2 = 0; - void* argp3 = 0; - int res3 = 0; - void* argp4 = 0; - int res4 = 0; - int res5; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectSetState", argc, 5, 5, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectSetState" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - ecode2 = SWIG_AsVal_double(argv[1], &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "GridDynObjectSetState" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - res3 = SWIG_ConvertPtr(argv[2], &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynObjectSetState" - "', argument " - "3" - " of type '" - "double const *" - "'"); - } - arg3 = reinterpret_cast(argp3); - res4 = SWIG_ConvertPtr(argv[3], &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "GridDynObjectSetState" - "', argument " - "4" - " of type '" - "double const *" - "'"); - } - arg4 = reinterpret_cast(argp4); - res5 = SWIG_ConvertPtr(argv[4], SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), - "in method '" - "GridDynObjectSetState" - "', argument " - "5" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status) - GridDynObjectSetState(arg1, arg2, (double const*)arg3, (double const*)arg4, arg5); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynObject_getStateVariableTypes(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)0; - double* arg2 = (double*)0; - SolverKey arg3 = (SolverKey)0; - int res1; - void* argp2 = 0; - int res2 = 0; - int res3; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectGetStateVariableTypes", argc, 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectGetStateVariableTypes" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectGetStateVariableTypes" - "', argument " - "2" - " of type '" - "double *" - "'"); - } - arg2 = reinterpret_cast(argp2); - res3 = SWIG_ConvertPtr(argv[2], SWIG_as_voidptrptr(&arg3), 0, 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynObjectGetStateVariableTypes" - "', argument " - "3" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status)GridDynObjectGetStateVariableTypes(arg1, arg2, arg3); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynObject_residual(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)0; - double* arg2 = (double*)0; - int arg3; - double* arg4 = (double*)0; - SolverKey arg5 = (SolverKey)0; - int res1; - void* argp2 = 0; - int res2 = 0; - int val3; - int ecode3 = 0; - void* argp4 = 0; - int res4 = 0; - int res5; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectResidual", argc, 5, 5, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectResidual" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectResidual" - "', argument " - "2" - " of type '" - "double const *" - "'"); - } - arg2 = reinterpret_cast(argp2); - ecode3 = SWIG_AsVal_int(argv[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectResidual" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - res4 = SWIG_ConvertPtr(argv[3], &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "GridDynObjectResidual" - "', argument " - "4" - " of type '" - "double *" - "'"); - } - arg4 = reinterpret_cast(argp4); - res5 = SWIG_ConvertPtr(argv[4], SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), - "in method '" - "GridDynObjectResidual" - "', argument " - "5" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status)GridDynObjectResidual(arg1, (double const*)arg2, arg3, arg4, arg5); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynObject_derivative(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)0; - double* arg2 = (double*)0; - int arg3; - double* arg4 = (double*)0; - SolverKey arg5 = (SolverKey)0; - int res1; - void* argp2 = 0; - int res2 = 0; - int val3; - int ecode3 = 0; - void* argp4 = 0; - int res4 = 0; - int res5; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectDerivative", argc, 5, 5, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectDerivative" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectDerivative" - "', argument " - "2" - " of type '" - "double const *" - "'"); - } - arg2 = reinterpret_cast(argp2); - ecode3 = SWIG_AsVal_int(argv[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectDerivative" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - res4 = SWIG_ConvertPtr(argv[3], &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "GridDynObjectDerivative" - "', argument " - "4" - " of type '" - "double *" - "'"); - } - arg4 = reinterpret_cast(argp4); - res5 = SWIG_ConvertPtr(argv[4], SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), - "in method '" - "GridDynObjectDerivative" - "', argument " - "5" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status)GridDynObjectDerivative(arg1, (double const*)arg2, arg3, arg4, arg5); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynObject_algebraicUpdate(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)0; - double* arg2 = (double*)0; - int arg3; - double* arg4 = (double*)0; - double arg5; - SolverKey arg6 = (SolverKey)0; - int res1; - void* argp2 = 0; - int res2 = 0; - int val3; - int ecode3 = 0; - void* argp4 = 0; - int res4 = 0; - double val5; - int ecode5 = 0; - int res6; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectAlgebraicUpdate", argc, 6, 6, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectAlgebraicUpdate" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectAlgebraicUpdate" - "', argument " - "2" - " of type '" - "double const *" - "'"); - } - arg2 = reinterpret_cast(argp2); - ecode3 = SWIG_AsVal_int(argv[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectAlgebraicUpdate" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - res4 = SWIG_ConvertPtr(argv[3], &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "GridDynObjectAlgebraicUpdate" - "', argument " - "4" - " of type '" - "double *" - "'"); - } - arg4 = reinterpret_cast(argp4); - ecode5 = SWIG_AsVal_double(argv[4], &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), - "in method '" - "GridDynObjectAlgebraicUpdate" - "', argument " - "5" - " of type '" - "double" - "'"); - } - arg5 = static_cast(val5); - res6 = SWIG_ConvertPtr(argv[5], SWIG_as_voidptrptr(&arg6), 0, 0); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), - "in method '" - "GridDynObjectAlgebraicUpdate" - "', argument " - "6" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status) - GridDynObjectAlgebraicUpdate(arg1, (double const*)arg2, arg3, arg4, arg5, arg6); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynObject_jacobian(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)0; - double* arg2 = (double*)0; - int arg3; - double arg4; - void (*arg5)(int, int, double) = (void (*)(int, int, double))0; - SolverKey arg6 = (SolverKey)0; - int res1; - void* argp2 = 0; - int res2 = 0; - int val3; - int ecode3 = 0; - double val4; - int ecode4 = 0; - int res6; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectJacobian", argc, 6, 6, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectJacobian" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectJacobian" - "', argument " - "2" - " of type '" - "double const *" - "'"); - } - arg2 = reinterpret_cast(argp2); - ecode3 = SWIG_AsVal_int(argv[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectJacobian" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - ecode4 = SWIG_AsVal_double(argv[3], &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), - "in method '" - "GridDynObjectJacobian" - "', argument " - "4" - " of type '" - "double" - "'"); - } - arg4 = static_cast(val4); - { - int res = - SWIG_ConvertFunctionPtr(argv[4], (void**)(&arg5), SWIGTYPE_p_f_int_int_double__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), - "in method '" - "GridDynObjectJacobian" - "', argument " - "5" - " of type '" - "void (*)(int,int,double)" - "'"); - } - } - res6 = SWIG_ConvertPtr(argv[5], SWIG_as_voidptrptr(&arg6), 0, 0); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), - "in method '" - "GridDynObjectJacobian" - "', argument " - "6" - " of type '" - "SolverKey" - "'"); - } - result = - (griddyn_status)GridDynObjectJacobian(arg1, (double const*)arg2, arg3, arg4, arg5, arg6); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynObject_ioPartialDerivatives(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)0; - double* arg2 = (double*)0; - int arg3; - void (*arg4)(int, int, double) = (void (*)(int, int, double))0; - SolverKey arg5 = (SolverKey)0; - int res1; - void* argp2 = 0; - int res2 = 0; - int val3; - int ecode3 = 0; - int res5; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectIoPartialDerivatives", argc, 5, 5, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectIoPartialDerivatives" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectIoPartialDerivatives" - "', argument " - "2" - " of type '" - "double const *" - "'"); - } - arg2 = reinterpret_cast(argp2); - ecode3 = SWIG_AsVal_int(argv[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectIoPartialDerivatives" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - { - int res = - SWIG_ConvertFunctionPtr(argv[3], (void**)(&arg4), SWIGTYPE_p_f_int_int_double__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), - "in method '" - "GridDynObjectIoPartialDerivatives" - "', argument " - "4" - " of type '" - "void (*)(int,int,double)" - "'"); - } - } - res5 = SWIG_ConvertPtr(argv[4], SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), - "in method '" - "GridDynObjectIoPartialDerivatives" - "', argument " - "5" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status) - GridDynObjectIoPartialDerivatives(arg1, (double const*)arg2, arg3, arg4, arg5); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -int _wrap_GridDynObject_outputPartialDerivatives(int resc, - mxArray* resv[], - int argc, - mxArray* argv[]) -{ - GridDynObject arg1 = (GridDynObject)0; - double* arg2 = (double*)0; - int arg3; - void (*arg4)(int, int, double) = (void (*)(int, int, double))0; - SolverKey arg5 = (SolverKey)0; - int res1; - void* argp2 = 0; - int res2 = 0; - int val3; - int ecode3 = 0; - int res5; - mxArray* _out; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectOutputPartialDerivatives", argc, 5, 5, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(argv[0], SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectOutputPartialDerivatives" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectOutputPartialDerivatives" - "', argument " - "2" - " of type '" - "double const *" - "'"); - } - arg2 = reinterpret_cast(argp2); - ecode3 = SWIG_AsVal_int(argv[2], &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectOutputPartialDerivatives" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - { - int res = - SWIG_ConvertFunctionPtr(argv[3], (void**)(&arg4), SWIGTYPE_p_f_int_int_double__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), - "in method '" - "GridDynObjectOutputPartialDerivatives" - "', argument " - "4" - " of type '" - "void (*)(int,int,double)" - "'"); - } - } - res5 = SWIG_ConvertPtr(argv[4], SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), - "in method '" - "GridDynObjectOutputPartialDerivatives" - "', argument " - "5" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status) - GridDynObjectOutputPartialDerivatives(arg1, (double const*)arg2, arg3, arg4, arg5); - _out = SWIG_From_int(static_cast(result)); - if (_out) --resc, *resv++ = _out; - return 0; -fail: - return 1; -} - -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ - -static void* _p_doubleArrayTo_p_double(void* x, int* SWIGUNUSEDPARM(newmemory)) -{ - return (void*)((double*)((doubleArray*)x)); -} -static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_doubleArray = - {"_p_doubleArray", "doubleArray *", 0, 0, (void*)"griddyn.doubleArray", 0}; -static swig_type_info _swigt__p_f_int_int_double__void = - {"_p_f_int_int_double__void", "void (*)(int,int,double)", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_griddyn_status_enum = { - "_p_griddyn_status_enum", - "enum griddyn_status_enum *|griddyn_status_enum *", - 0, - 0, - (void*)0, - 0}; -static swig_type_info _swigt__p_int = {"_p_int", "int *|griddyn_status *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_void = { - "_p_void", - "GridDynObject|GridDynVectorQuery|GridDynSimulation|GridDynEvent|void *|SolverKey|GridDynSingleQuery", - 0, - 0, - (void*)0, - 0}; - -static swig_type_info* swig_type_initial[] = { - &_swigt__p_char, - &_swigt__p_double, - &_swigt__p_doubleArray, - &_swigt__p_f_int_int_double__void, - &_swigt__p_griddyn_status_enum, - &_swigt__p_int, - &_swigt__p_p_char, - &_swigt__p_void, -}; - -static swig_cast_info _swigc__p_char[] = {{&_swigt__p_char, 0, 0, 0}, {0, 0, 0, 0}}; -static swig_cast_info _swigc__p_double[] = { - {&_swigt__p_doubleArray, _p_doubleArrayTo_p_double, 0, 0}, - {&_swigt__p_double, 0, 0, 0}, - {0, 0, 0, 0}}; -static swig_cast_info _swigc__p_doubleArray[] = {{&_swigt__p_doubleArray, 0, 0, 0}, {0, 0, 0, 0}}; -static swig_cast_info _swigc__p_f_int_int_double__void[] = - {{&_swigt__p_f_int_int_double__void, 0, 0, 0}, {0, 0, 0, 0}}; -static swig_cast_info _swigc__p_griddyn_status_enum[] = {{&_swigt__p_griddyn_status_enum, 0, 0, 0}, - {0, 0, 0, 0}}; -static swig_cast_info _swigc__p_int[] = {{&_swigt__p_int, 0, 0, 0}, {0, 0, 0, 0}}; -static swig_cast_info _swigc__p_p_char[] = {{&_swigt__p_p_char, 0, 0, 0}, {0, 0, 0, 0}}; -static swig_cast_info _swigc__p_void[] = {{&_swigt__p_void, 0, 0, 0}, {0, 0, 0, 0}}; - -static swig_cast_info* swig_cast_initial[] = { - _swigc__p_char, - _swigc__p_double, - _swigc__p_doubleArray, - _swigc__p_f_int_int_double__void, - _swigc__p_griddyn_status_enum, - _swigc__p_int, - _swigc__p_p_char, - _swigc__p_void, -}; - -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ - -/* ----------------------------------------------------------------------------- - * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to - * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of - * swig_module, and does all the lookup, filling in the swig_module.types - * array with the correct data and linking the correct swig_cast_info - * structures together. - * - * The generated swig_type_info structures are assigned statically to an initial - * array. We just loop through that array, and handle each type individually. - * First we lookup if this type has been already loaded, and if so, use the - * loaded structure instead of the generated one. Then we have to fill in the - * cast linked list. The cast data is initially stored in something like a - * two-dimensional array. Each row corresponds to a type (there are the same - * number of rows as there are in the swig_type_initial array). Each entry in - * a column is one of the swig_cast_info structures for that type. - * The cast_initial array is actually an array of arrays, because each row has - * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it - * adding the casts to the list. The one last trick we need to do is making - * sure the type pointer in the swig_cast_info struct is correct. - * - * First off, we lookup the cast->type name to see if it is already loaded. - * There are three cases to handle: - * 1) If the cast->type has already been loaded AND the type we are adding - * casting info to has not been loaded (it is in this module), THEN we - * replace the cast->type pointer with the type pointer that has already - * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the - * cast->type) are loaded, THEN the cast info has already been loaded by - * the previous module so we just ignore it. - * 3) Finally, if cast->type has not already been loaded, then we add that - * swig_cast_info to the linked list (because the cast->type) pointer will - * be correct. - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus -extern "C" { -# if 0 -} /* c-mode */ -# endif -#endif - -#if 0 -# define SWIGRUNTIME_DEBUG -#endif - -SWIGRUNTIME void SWIG_InitializeModule(void* clientdata) -{ - size_t i; - swig_module_info *module_head, *iter; - int init; - - /* check to see if the circular list has been setup, if not, set it up */ - if (swig_module.next == 0) { - /* Initialize the swig_module */ - swig_module.type_initial = swig_type_initial; - swig_module.cast_initial = swig_cast_initial; - swig_module.next = &swig_module; - init = 1; - } else { - init = 0; - } - - /* Try and load any already created modules */ - module_head = SWIG_GetModule(clientdata); - if (!module_head) { - /* This is the first module loaded for this interpreter */ - /* so set the swig module into the interpreter */ - SWIG_SetModule(clientdata, &swig_module); - } else { - /* the interpreter has loaded a SWIG module, but has it loaded this one? */ - iter = module_head; - do { - if (iter == &swig_module) { - /* Our module is already in the list, so there's nothing more to do. */ - return; - } - iter = iter->next; - } while (iter != module_head); - - /* otherwise we must add our module into the list */ - swig_module.next = module_head->next; - module_head->next = &swig_module; - } - - /* When multiple interpreters are used, a module could have already been initialized in - a different interpreter, but not yet have a pointer in this interpreter. - In this case, we do not want to continue adding types... everything should be - set up already */ - if (init == 0) return; - - /* Now work on filling in swig_module.types */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: size %d\n", swig_module.size); -#endif - for (i = 0; i < swig_module.size; ++i) { - swig_type_info* type = 0; - swig_type_info* ret; - swig_cast_info* cast; - -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); -#endif - - /* if there is another module already loaded */ - if (swig_module.next != &swig_module) { - type = SWIG_MangledTypeQueryModule(swig_module.next, - &swig_module, - swig_module.type_initial[i]->name); - } - if (type) { - /* Overwrite clientdata field */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found type %s\n", type->name); -#endif - if (swig_module.type_initial[i]->clientdata) { - type->clientdata = swig_module.type_initial[i]->clientdata; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); -#endif - } - } else { - type = swig_module.type_initial[i]; - } - - /* Insert casting types */ - cast = swig_module.cast_initial[i]; - while (cast->type) { - /* Don't need to add information already in the list */ - ret = 0; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); -#endif - if (swig_module.next != &swig_module) { - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); -#ifdef SWIGRUNTIME_DEBUG - if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); -#endif - } - if (ret) { - if (type == swig_module.type_initial[i]) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: skip old type %s\n", ret->name); -#endif - cast->type = ret; - ret = 0; - } else { - /* Check for casting already in the list */ - swig_cast_info* ocast = SWIG_TypeCheck(ret->name, type); -#ifdef SWIGRUNTIME_DEBUG - if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); -#endif - if (!ocast) ret = 0; - } - } - - if (!ret) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); -#endif - if (type->cast) { - type->cast->prev = cast; - cast->next = type->cast; - } - type->cast = cast; - } - cast++; - } - /* Set entry in modules->types array equal to the type */ - swig_module.types[i] = type; - } - swig_module.types[i] = 0; - -#ifdef SWIGRUNTIME_DEBUG - printf("**** SWIG_InitializeModule: Cast List ******\n"); - for (i = 0; i < swig_module.size; ++i) { - int j = 0; - swig_cast_info* cast = swig_module.cast_initial[i]; - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); - while (cast->type) { - printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); - cast++; - ++j; - } - printf("---- Total casts: %d\n", j); - } - printf("**** SWIG_InitializeModule: Cast List ******\n"); -#endif -} - -/* This function will propagate the clientdata field of type to - * any new swig_type_info structures that have been added into the list - * of equivalent types. It is like calling - * SWIG_TypeClientData(type, clientdata) a second time. - */ -SWIGRUNTIME void SWIG_PropagateClientData(void) -{ - size_t i; - swig_cast_info* equiv; - static int init_run = 0; - - if (init_run) return; - init_run = 1; - - for (i = 0; i < swig_module.size; i++) { - if (swig_module.types[i]->clientdata) { - equiv = swig_module.types[i]->cast; - while (equiv) { - if (!equiv->converter) { - if (equiv->type && !equiv->type->clientdata) - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); - } - equiv = equiv->next; - } - } - } -} - -#ifdef __cplusplus -# if 0 -{ /* c-mode */ -# endif -} -#endif - -void SWIG_Matlab_LoadModule() -{ - /* Only call once */ - static int moduleIsLoaded = 0; - if (moduleIsLoaded) return; - moduleIsLoaded = 1; - - /* Prevent unloading this file until MATLAB exits */ - mexLock(); - - /* Exit function (called when unloaded) */ - mexAtExit(SWIG_Matlab_ExitFcn); - - /* Load dependent modules and initialize */ - - SWIG_InitializeModule(0); -} - -SWIGINTERN const char* SwigConstantName(int con_id) -{ - switch (con_id) { - case 0: - return "griddyn_ok"; - case 1: - return "griddyn_invalid_object"; - case 2: - return "griddyn_invalid_parameter_value"; - case 3: - return "griddyn_unknown_parameter"; - case 4: - return "griddyn_add_failure"; - case 5: - return "griddyn_remove_failure"; - case 6: - return "griddyn_query_load_failure"; - case 7: - return "griddyn_file_load_failure"; - case 8: - return "griddyn_solve_error"; - case 9: - return "griddyn_object_not_initialized"; - case 10: - return "griddyn_invalid_function_call"; - case 11: - return "griddyn_function_failure"; - case 12: - return "GRIDDYN_PENDING"; - case 13: - return "GRIDDYN_COMPLETE"; - default: - return 0; - } -} - -SWIGINTERN int swigConstantName(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - if (argc != 1 || !mxIsDouble(*argv) || mxGetNumberOfElements(*argv) != 1) { - SWIG_Error( - SWIG_RuntimeError, - "This mex file should only be called from inside the .m files generated by SWIG. The input should be the constant ID."); - return 1; - } - if (resc != 1) { - SWIG_Error(SWIG_RuntimeError, "The function should have one output."); - return 1; - } - int con_id = (int)mxGetScalar(*argv); - const char* s = SwigConstantName(con_id); - if (s == 0) { - SWIG_Error(SWIG_RuntimeError, "No such constant ID."); - return 1; - } - *resv = mxCreateString(s); - return 0; -} - -SWIGINTERN int swigConstant(int SWIGUNUSEDPARM(resc), mxArray* resv[], int argc, mxArray* argv[]) -{ - if (--argc < 0 || !mxIsDouble(*argv) || mxGetNumberOfElements(*argv) != 1) { - SWIG_Error( - SWIG_RuntimeError, - "This function should only be called from inside the .m files generated by SWIG. First input should be the constant ID ."); - return 1; - } - int con_id = (int)mxGetScalar(*argv++); - switch (con_id) { - case 0: - *resv = SWIG_Matlab_SetConstant(module_ns, - "griddyn_ok", - SWIG_From_int(static_cast(griddyn_ok))); - ; - break; - case 1: - *resv = - SWIG_Matlab_SetConstant(module_ns, - "griddyn_invalid_object", - SWIG_From_int(static_cast(griddyn_invalid_object))); - ; - break; - case 2: - *resv = SWIG_Matlab_SetConstant(module_ns, - "griddyn_invalid_parameter_value", - SWIG_From_int( - static_cast(griddyn_invalid_parameter_value))); - ; - break; - case 3: - *resv = - SWIG_Matlab_SetConstant(module_ns, - "griddyn_unknown_parameter", - SWIG_From_int(static_cast(griddyn_unknown_parameter))); - ; - break; - case 4: - *resv = SWIG_Matlab_SetConstant(module_ns, - "griddyn_add_failure", - SWIG_From_int(static_cast(griddyn_add_failure))); - ; - break; - case 5: - *resv = - SWIG_Matlab_SetConstant(module_ns, - "griddyn_remove_failure", - SWIG_From_int(static_cast(griddyn_remove_failure))); - ; - break; - case 6: - *resv = SWIG_Matlab_SetConstant(module_ns, - "griddyn_query_load_failure", - SWIG_From_int( - static_cast(griddyn_query_load_failure))); - ; - break; - case 7: - *resv = - SWIG_Matlab_SetConstant(module_ns, - "griddyn_file_load_failure", - SWIG_From_int(static_cast(griddyn_file_load_failure))); - ; - break; - case 8: - *resv = SWIG_Matlab_SetConstant(module_ns, - "griddyn_solve_error", - SWIG_From_int(static_cast(griddyn_solve_error))); - ; - break; - case 9: - *resv = SWIG_Matlab_SetConstant(module_ns, - "griddyn_object_not_initialized", - SWIG_From_int( - static_cast(griddyn_object_not_initialized))); - ; - break; - case 10: - *resv = SWIG_Matlab_SetConstant(module_ns, - "griddyn_invalid_function_call", - SWIG_From_int( - static_cast(griddyn_invalid_function_call))); - ; - break; - case 11: - *resv = - SWIG_Matlab_SetConstant(module_ns, - "griddyn_function_failure", - SWIG_From_int(static_cast(griddyn_function_failure))); - ; - break; - case 12: - *resv = SWIG_Matlab_SetConstant(module_ns, - "GRIDDYN_PENDING", - SWIG_From_int(static_cast((25)))); - ; - break; - case 13: - *resv = SWIG_Matlab_SetConstant(module_ns, - "GRIDDYN_COMPLETE", - SWIG_From_int(static_cast((30)))); - ; - break; - default: - SWIG_Error(SWIG_RuntimeError, "No such constant."); - return 1; - } - return 0; -} - -SWIGINTERN const char* SwigFunctionName(int fcn_id) -{ - switch (fcn_id) { - case 0: - return "swigConstant"; - case 1: - return "swigFunctionName"; - case 2: - return "swigConstantName"; - case 3: - return "swigThis"; - case 4: - return "swigTouch"; - case 5: - return "_wrap_new_doublep"; - case 6: - return "_wrap_copy_doublep"; - case 7: - return "_wrap_delete_doublep"; - case 8: - return "_wrap_doublep_assign"; - case 9: - return "_wrap_doublep_value"; - case 10: - return "_wrap_new_charp"; - case 11: - return "_wrap_copy_charp"; - case 12: - return "_wrap_delete_charp"; - case 13: - return "_wrap_charp_assign"; - case 14: - return "_wrap_charp_value"; - case 15: - return "new_doubleArray"; - case 16: - return "delete_doubleArray"; - case 17: - return "doubleArray_paren"; - case 18: - return "doubleArray_paren_asgn"; - case 19: - return "doubleArray_cast"; - case 20: - return "doubleArray_frompointer"; - case 21: - return "_wrap_GridDynObject_create"; - case 22: - return "_wrap_GridDynObject_clone"; - case 23: - return "_wrap_GridDynObject_free"; - case 24: - return "_wrap_GridDynObject_add"; - case 25: - return "_wrap_GridDynObject_remove"; - case 26: - return "_wrap_GridDynObject_setString"; - case 27: - return "_wrap_GridDynObject_setValue"; - case 28: - return "_wrap_GridDynObject_setValueUnits"; - case 29: - return "_wrap_GridDynObject_setFlag"; - case 30: - return "_wrap_GridDynObject_getString"; - case 31: - return "_wrap_GridDynObject_getValue"; - case 32: - return "_wrap_GridDynObject_getValueUnits"; - case 33: - return "_wrap_GridDynObject_getFlag"; - case 34: - return "_wrap_GridDynObject_find"; - case 35: - return "_wrap_GridDynObject_getSubObject"; - case 36: - return "_wrap_GridDynObject_findByUserId"; - case 37: - return "_wrap_GridDynObject_getParent"; - case 38: - return "_wrap_GridDynObject_getType"; - case 39: - return "_wrap_gridDynSimulationCreate"; - case 40: - return "_wrap_gridDynSimulationFree"; - case 41: - return "_wrap_gridDynSimulationInitializeFromString"; - case 42: - return "_wrap_gridDynSimulationInitializeFromArgs"; - case 43: - return "_wrap_gridDynSimulationLoadfile"; - case 44: - return "_wrap_gridDynSimulationAddCommand"; - case 45: - return "_wrap_gridDynSimulationPowerflowInitialize"; - case 46: - return "_wrap_gridDynSimulationPowerflow"; - case 47: - return "_wrap_gridDynSimulationDynamicInitialize"; - case 48: - return "_wrap_gridDynSimulationReset"; - case 49: - return "_wrap_gridDynSimulationGetCurrentTime"; - case 50: - return "_wrap_gridDynSimulationRun"; - case 51: - return "_wrap_gridDynSimulationRunTo"; - case 52: - return "_wrap_gridDynSimulationStep"; - case 53: - return "_wrap_gridDynSimulationRunAsync"; - case 54: - return "_wrap_gridDynSimulationRunToAsync"; - case 55: - return "_wrap_gridDynSimulationStepAsync"; - case 56: - return "_wrap_gridDynSimulationGetStatus"; - case 57: - return "_wrap_getSimulationObject"; - case 58: - return "_wrap_gridDynSimulationGetSolverKey"; - case 59: - return "_wrap_gridDynSolverKeyFree"; - case 60: - return "_wrap_gridDynSimulationStateSize"; - case 61: - return "_wrap_gridDynSimulationBusCount"; - case 62: - return "_wrap_gridDynSimulationLineCount"; - case 63: - return "_wrap_gridDynSimulationGetResults"; - case 64: - return "_wrap_gridDynSimulationGuessState"; - case 65: - return "_wrap_gridDynSimulationSetState"; - case 66: - return "_wrap_gridDynSimulationGetStateVariableTypes"; - case 67: - return "_wrap_gridDynSimulationResidual"; - case 68: - return "_wrap_gridDynSimulationDerivative"; - case 69: - return "_wrap_gridDynSimulationAlgebraicUpdate"; - case 70: - return "_wrap_gridDynSimulationJacobian"; - case 71: - return "_wrap_GridDynSingleQuery_create"; - case 72: - return "_wrap_GridDynVectorQuery_create"; - case 73: - return "_wrap_GridDynSingleQuery_free"; - case 74: - return "_wrap_GridDynVectorQuery_free"; - case 75: - return "_wrap_GridDynSingleQuery_run"; - case 76: - return "_wrap_GridDynVectorQuery_run"; - case 77: - return "_wrap_GridDynVectorQuery_append"; - case 78: - return "_wrap_GridDynSingleQuery_update"; - case 79: - return "_wrap_GridDynVectorQuery_update"; - case 80: - return "_wrap_GridDynEvent_create"; - case 81: - return "_wrap_GridDynEvent_free"; - case 82: - return "_wrap_GridDynEvent_trigger"; - case 83: - return "_wrap_GridDynEvent_schedule"; - case 84: - return "_wrap_GridDynEvent_setValue"; - case 85: - return "_wrap_GridDynEvent_setString"; - case 86: - return "_wrap_GridDynEvent_setFlag"; - case 87: - return "_wrap_GridDynEvent_setTarget"; - case 88: - return "_wrap_GridDynObject_stateSize"; - case 89: - return "_wrap_GridDynObject_guessState"; - case 90: - return "_wrap_GridDynObject_setState"; - case 91: - return "_wrap_GridDynObject_getStateVariableTypes"; - case 92: - return "_wrap_GridDynObject_residual"; - case 93: - return "_wrap_GridDynObject_derivative"; - case 94: - return "_wrap_GridDynObject_algebraicUpdate"; - case 95: - return "_wrap_GridDynObject_jacobian"; - case 96: - return "_wrap_GridDynObject_ioPartialDerivatives"; - case 97: - return "_wrap_GridDynObject_outputPartialDerivatives"; - default: - return 0; - } -} - -SWIGINTERN int swigFunctionName(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - if (argc != 1 || !mxIsDouble(*argv) || mxGetNumberOfElements(*argv) != 1) { - SWIG_Error( - SWIG_RuntimeError, - "This mex file should only be called from inside the .m files generated by SWIG. The input should be the function ID."); - return 1; - } - if (resc != 1) { - SWIG_Error(SWIG_RuntimeError, "The function should have one output."); - return 1; - } - int fcn_id = (int)mxGetScalar(*argv); - const char* s = SwigFunctionName(fcn_id); - if (s == 0) { - SWIG_Error(SWIG_RuntimeError, "No such function ID."); - return 1; - } - *resv = mxCreateString(s); - return 0; -} - -SWIGINTERN int swigThis(int resc, mxArray* resv[], int argc, mxArray* argv[]) -{ - if (argc != 1 || resc != 1) { - SWIG_Error(SWIG_RuntimeError, "swigThis should have one input and one output."); - return 1; - } - SwigPtr* swig_ptr = SWIG_Matlab_getSwigPtr(argv[0]); - if (!swig_ptr) { - SWIG_Error(SWIG_RuntimeError, "The argument should be a SWIG class."); - return 1; - } - resv[0] = mxCreateNumericMatrix(1, 1, mxUINT64_CLASS, mxREAL); - *(uint64_T*)mxGetData(resv[0]) = (uint64_T)swig_ptr->ptr; - return 0; -} - -SWIGINTERN int - swigTouch(int resc, mxArray** SWIGUNUSEDPARM(resv), int argc, mxArray** SWIGUNUSEDPARM(argv)) -{ - if (argc != 0 || resc != 0) { - SWIG_Error(SWIG_RuntimeError, "swigTouch should have no inputs or outputs."); - return 1; - } - return 0; -} - -extern "C" void mexFunction(int resc, mxArray* resv[], int argc, const mxArray* argv[]) -{ - /* Initialize module if first call */ - SWIG_Matlab_LoadModule(); - - if (--argc < 0 || !mxIsDouble(*argv) || mxGetNumberOfElements(*argv) != 1) - mexErrMsgTxt( - "This mex file should only be called from inside the .m files generated by SWIG. First input should be the function ID ."); - int fcn_id = (int)mxGetScalar(*argv++); - int flag = 0; - switch (fcn_id) { - case 0: - flag = swigConstant(resc, resv, argc, (mxArray**)(argv)); - break; - case 1: - flag = swigFunctionName(resc, resv, argc, (mxArray**)(argv)); - break; - case 2: - flag = swigConstantName(resc, resv, argc, (mxArray**)(argv)); - break; - case 3: - flag = swigThis(resc, resv, argc, (mxArray**)(argv)); - break; - case 4: - flag = swigTouch(resc, resv, argc, (mxArray**)(argv)); - break; - case 5: - flag = _wrap_new_doublep(resc, resv, argc, (mxArray**)(argv)); - break; - case 6: - flag = _wrap_copy_doublep(resc, resv, argc, (mxArray**)(argv)); - break; - case 7: - flag = _wrap_delete_doublep(resc, resv, argc, (mxArray**)(argv)); - break; - case 8: - flag = _wrap_doublep_assign(resc, resv, argc, (mxArray**)(argv)); - break; - case 9: - flag = _wrap_doublep_value(resc, resv, argc, (mxArray**)(argv)); - break; - case 10: - flag = _wrap_new_charp(resc, resv, argc, (mxArray**)(argv)); - break; - case 11: - flag = _wrap_copy_charp(resc, resv, argc, (mxArray**)(argv)); - break; - case 12: - flag = _wrap_delete_charp(resc, resv, argc, (mxArray**)(argv)); - break; - case 13: - flag = _wrap_charp_assign(resc, resv, argc, (mxArray**)(argv)); - break; - case 14: - flag = _wrap_charp_value(resc, resv, argc, (mxArray**)(argv)); - break; - case 15: - flag = _wrap_new_doubleArray(resc, resv, argc, (mxArray**)(argv)); - break; - case 16: - flag = _wrap_delete_doubleArray(resc, resv, argc, (mxArray**)(argv)); - break; - case 17: - flag = _wrap_doubleArray_paren(resc, resv, argc, (mxArray**)(argv)); - break; - case 18: - flag = _wrap_doubleArray_paren_asgn(resc, resv, argc, (mxArray**)(argv)); - break; - case 19: - flag = _wrap_doubleArray_cast(resc, resv, argc, (mxArray**)(argv)); - break; - case 20: - flag = _wrap_doubleArray_frompointer(resc, resv, argc, (mxArray**)(argv)); - break; - case 21: - flag = _wrap_GridDynObject_create(resc, resv, argc, (mxArray**)(argv)); - break; - case 22: - flag = _wrap_GridDynObject_clone(resc, resv, argc, (mxArray**)(argv)); - break; - case 23: - flag = _wrap_GridDynObject_free(resc, resv, argc, (mxArray**)(argv)); - break; - case 24: - flag = _wrap_GridDynObject_add(resc, resv, argc, (mxArray**)(argv)); - break; - case 25: - flag = _wrap_GridDynObject_remove(resc, resv, argc, (mxArray**)(argv)); - break; - case 26: - flag = _wrap_GridDynObject_setString(resc, resv, argc, (mxArray**)(argv)); - break; - case 27: - flag = _wrap_GridDynObject_setValue(resc, resv, argc, (mxArray**)(argv)); - break; - case 28: - flag = _wrap_GridDynObject_setValueUnits(resc, resv, argc, (mxArray**)(argv)); - break; - case 29: - flag = _wrap_GridDynObject_setFlag(resc, resv, argc, (mxArray**)(argv)); - break; - case 30: - flag = _wrap_GridDynObject_getString(resc, resv, argc, (mxArray**)(argv)); - break; - case 31: - flag = _wrap_GridDynObject_getValue(resc, resv, argc, (mxArray**)(argv)); - break; - case 32: - flag = _wrap_GridDynObject_getValueUnits(resc, resv, argc, (mxArray**)(argv)); - break; - case 33: - flag = _wrap_GridDynObject_getFlag(resc, resv, argc, (mxArray**)(argv)); - break; - case 34: - flag = _wrap_GridDynObject_find(resc, resv, argc, (mxArray**)(argv)); - break; - case 35: - flag = _wrap_GridDynObject_getSubObject(resc, resv, argc, (mxArray**)(argv)); - break; - case 36: - flag = _wrap_GridDynObject_findByUserId(resc, resv, argc, (mxArray**)(argv)); - break; - case 37: - flag = _wrap_GridDynObject_getParent(resc, resv, argc, (mxArray**)(argv)); - break; - case 38: - flag = _wrap_GridDynObject_getType(resc, resv, argc, (mxArray**)(argv)); - break; - case 39: - flag = _wrap_gridDynSimulationCreate(resc, resv, argc, (mxArray**)(argv)); - break; - case 40: - flag = _wrap_gridDynSimulationFree(resc, resv, argc, (mxArray**)(argv)); - break; - case 41: - flag = _wrap_gridDynSimulationInitializeFromString(resc, resv, argc, (mxArray**)(argv)); - break; - case 42: - flag = _wrap_gridDynSimulationInitializeFromArgs(resc, resv, argc, (mxArray**)(argv)); - break; - case 43: - flag = _wrap_gridDynSimulationLoadfile(resc, resv, argc, (mxArray**)(argv)); - break; - case 44: - flag = _wrap_gridDynSimulationAddCommand(resc, resv, argc, (mxArray**)(argv)); - break; - case 45: - flag = _wrap_gridDynSimulationPowerflowInitialize(resc, resv, argc, (mxArray**)(argv)); - break; - case 46: - flag = _wrap_gridDynSimulationPowerflow(resc, resv, argc, (mxArray**)(argv)); - break; - case 47: - flag = _wrap_gridDynSimulationDynamicInitialize(resc, resv, argc, (mxArray**)(argv)); - break; - case 48: - flag = _wrap_gridDynSimulationReset(resc, resv, argc, (mxArray**)(argv)); - break; - case 49: - flag = _wrap_gridDynSimulationGetCurrentTime(resc, resv, argc, (mxArray**)(argv)); - break; - case 50: - flag = _wrap_gridDynSimulationRun(resc, resv, argc, (mxArray**)(argv)); - break; - case 51: - flag = _wrap_gridDynSimulationRunTo(resc, resv, argc, (mxArray**)(argv)); - break; - case 52: - flag = _wrap_gridDynSimulationStep(resc, resv, argc, (mxArray**)(argv)); - break; - case 53: - flag = _wrap_gridDynSimulationRunAsync(resc, resv, argc, (mxArray**)(argv)); - break; - case 54: - flag = _wrap_gridDynSimulationRunToAsync(resc, resv, argc, (mxArray**)(argv)); - break; - case 55: - flag = _wrap_gridDynSimulationStepAsync(resc, resv, argc, (mxArray**)(argv)); - break; - case 56: - flag = _wrap_gridDynSimulationGetStatus(resc, resv, argc, (mxArray**)(argv)); - break; - case 57: - flag = _wrap_getSimulationObject(resc, resv, argc, (mxArray**)(argv)); - break; - case 58: - flag = _wrap_gridDynSimulationGetSolverKey(resc, resv, argc, (mxArray**)(argv)); - break; - case 59: - flag = _wrap_gridDynSolverKeyFree(resc, resv, argc, (mxArray**)(argv)); - break; - case 60: - flag = _wrap_gridDynSimulationStateSize(resc, resv, argc, (mxArray**)(argv)); - break; - case 61: - flag = _wrap_gridDynSimulationBusCount(resc, resv, argc, (mxArray**)(argv)); - break; - case 62: - flag = _wrap_gridDynSimulationLineCount(resc, resv, argc, (mxArray**)(argv)); - break; - case 63: - flag = _wrap_gridDynSimulationGetResults(resc, resv, argc, (mxArray**)(argv)); - break; - case 64: - flag = _wrap_gridDynSimulationGuessState(resc, resv, argc, (mxArray**)(argv)); - break; - case 65: - flag = _wrap_gridDynSimulationSetState(resc, resv, argc, (mxArray**)(argv)); - break; - case 66: - flag = - _wrap_gridDynSimulationGetStateVariableTypes(resc, resv, argc, (mxArray**)(argv)); - break; - case 67: - flag = _wrap_gridDynSimulationResidual(resc, resv, argc, (mxArray**)(argv)); - break; - case 68: - flag = _wrap_gridDynSimulationDerivative(resc, resv, argc, (mxArray**)(argv)); - break; - case 69: - flag = _wrap_gridDynSimulationAlgebraicUpdate(resc, resv, argc, (mxArray**)(argv)); - break; - case 70: - flag = _wrap_gridDynSimulationJacobian(resc, resv, argc, (mxArray**)(argv)); - break; - case 71: - flag = _wrap_GridDynSingleQuery_create(resc, resv, argc, (mxArray**)(argv)); - break; - case 72: - flag = _wrap_GridDynVectorQuery_create(resc, resv, argc, (mxArray**)(argv)); - break; - case 73: - flag = _wrap_GridDynSingleQuery_free(resc, resv, argc, (mxArray**)(argv)); - break; - case 74: - flag = _wrap_GridDynVectorQuery_free(resc, resv, argc, (mxArray**)(argv)); - break; - case 75: - flag = _wrap_GridDynSingleQuery_run(resc, resv, argc, (mxArray**)(argv)); - break; - case 76: - flag = _wrap_GridDynVectorQuery_run(resc, resv, argc, (mxArray**)(argv)); - break; - case 77: - flag = _wrap_GridDynVectorQuery_append(resc, resv, argc, (mxArray**)(argv)); - break; - case 78: - flag = _wrap_GridDynSingleQuery_update(resc, resv, argc, (mxArray**)(argv)); - break; - case 79: - flag = _wrap_GridDynVectorQuery_update(resc, resv, argc, (mxArray**)(argv)); - break; - case 80: - flag = _wrap_GridDynEvent_create(resc, resv, argc, (mxArray**)(argv)); - break; - case 81: - flag = _wrap_GridDynEvent_free(resc, resv, argc, (mxArray**)(argv)); - break; - case 82: - flag = _wrap_GridDynEvent_trigger(resc, resv, argc, (mxArray**)(argv)); - break; - case 83: - flag = _wrap_GridDynEvent_schedule(resc, resv, argc, (mxArray**)(argv)); - break; - case 84: - flag = _wrap_GridDynEvent_setValue(resc, resv, argc, (mxArray**)(argv)); - break; - case 85: - flag = _wrap_GridDynEvent_setString(resc, resv, argc, (mxArray**)(argv)); - break; - case 86: - flag = _wrap_GridDynEvent_setFlag(resc, resv, argc, (mxArray**)(argv)); - break; - case 87: - flag = _wrap_GridDynEvent_setTarget(resc, resv, argc, (mxArray**)(argv)); - break; - case 88: - flag = _wrap_GridDynObject_stateSize(resc, resv, argc, (mxArray**)(argv)); - break; - case 89: - flag = _wrap_GridDynObject_guessState(resc, resv, argc, (mxArray**)(argv)); - break; - case 90: - flag = _wrap_GridDynObject_setState(resc, resv, argc, (mxArray**)(argv)); - break; - case 91: - flag = _wrap_GridDynObject_getStateVariableTypes(resc, resv, argc, (mxArray**)(argv)); - break; - case 92: - flag = _wrap_GridDynObject_residual(resc, resv, argc, (mxArray**)(argv)); - break; - case 93: - flag = _wrap_GridDynObject_derivative(resc, resv, argc, (mxArray**)(argv)); - break; - case 94: - flag = _wrap_GridDynObject_algebraicUpdate(resc, resv, argc, (mxArray**)(argv)); - break; - case 95: - flag = _wrap_GridDynObject_jacobian(resc, resv, argc, (mxArray**)(argv)); - break; - case 96: - flag = _wrap_GridDynObject_ioPartialDerivatives(resc, resv, argc, (mxArray**)(argv)); - break; - case 97: - flag = - _wrap_GridDynObject_outputPartialDerivatives(resc, resv, argc, (mxArray**)(argv)); - break; - default: - flag = 1, SWIG_Error(SWIG_RuntimeError, "No function id %d.", fcn_id); - } - if (flag) { - mexErrMsgIdAndTxt(SWIG_ErrorType(SWIG_lasterror_code), SWIG_lasterror_msg); - } -} diff --git a/interfaces/octave/CMakeLists.txt b/interfaces/octave/CMakeLists.txt deleted file mode 100644 index d06af24da..000000000 --- a/interfaces/octave/CMakeLists.txt +++ /dev/null @@ -1,66 +0,0 @@ -# Generate SWIG wrapper (for Octave) -message(STATUS "Building Octave interface") - -find_package(Octave REQUIRED) -if(NOT MKOCTFILE_EXECUTABLE) - show_variable( - OCTAVE_INSTALL_LOCATION PATH "installation location for Octave" - "${OCTAVE_INSTALL_LOCATION}" - ) -endif() - -if(DISABLE_SWIG OR NOT SWIG_EXECUTABLE) - configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/griddynOCTAVE_wrap.cpp - ${CMAKE_CURRENT_BINARY_DIR}/griddynOCTAVE_wrap.cpp COPYONLY - ) - -else() - - # Compile OCT file add_custom_target("griddynOCT" ALL) - file(GLOB SHARED_LIB_HEADERS ${CMAKE_SOURCE_DIR}/src/griddyn_shared/*.h) - - # custom command for building the wrap file - add_custom_command( - OUTPUT ${CMAKE_CURENT_BINARY_DIR}/griddynOCTAVE_wrap.cxx - COMMAND - "${SWIG_EXECUTABLE}" "-octave" "-c++" -o "griddynOCTAVE_wrap.cxx" - "-I${CMAKE_SOURCE_DIR}/src/griddyn_shared/" ${CMAKE_CURRENT_SOURCE_DIR}/griddynOctave.i - DEPENDS ${CMAKE_SOURCE_DIR}/swig/griddyn.i ${CMAKE_SOURCE_DIR}/swig/octave/griddynOctave.i - ${SHARED_LIB_HEADERS} - ) - - add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/griddynOCTAVE_wrap.cpp - COMMAND ${CMAKE_COMMAND} -D VOID_SIZE=${CMAKE_SIZEOF_VOID_P} -P - ${CMAKE_CURRENT_SOURCE_DIR}/modifyOctSourceFile.cmake - DEPENDS ${PROJECT_CURENT_BINARY_DIR}/griddynOCTAVE_wrap.cxx - ) - -endif() - -add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/mkgriddynOctFile.m - COMMAND - ${CMAKE_COMMAND} -D LIBRARY_FILE=$ -D - BUILD_FILE=${CMAKE_CURRENT_BINARY_DIR}/griddynOCTAVE_wrap.cpp -D - LIBRARY_INCLUDE_LOCATION=${CMAKE_SOURCE_DIR}/src/griddyn_shared/ -D - SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -P - ${CMAKE_CURRENT_SOURCE_DIR}/generateOCTcreationScript.cmake - DEPENDS ${PROJECT_CURRENT_BINARY_DIR}/griddynOCTAVE_wrap.cpp -) - -add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/griddyn.oct - COMMAND ${OCTAVE_EXECUTABLE} "-q" "${CMAKE_CURRENT_BINARY_DIR}/mkgriddynOCTFile.m" - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/mkgriddynOCTFile.m griddyn_shared_lib - ${CMAKE_CURRENT_BINARY_DIR}/griddynOCTAVE_wrap.cpp -) - -add_custom_target(griddynOCT ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/griddyn.oct) - -set_target_properties(griddynOCT PROPERTIES FOLDER interfaces) - -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/griddyn.oct DESTINATION octave COMPONENT octave) -install(FILES $ DESTINATION octave COMPONENT octave) -install(FILES ${KEY_LIBRARY_FILES} DESTINATION octave COMPONENT octave) diff --git a/interfaces/octave/README.md b/interfaces/octave/README.md deleted file mode 100644 index 68e7afbcc..000000000 --- a/interfaces/octave/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# griddynOCT - -## Prerequisites - -- Octave must be installed on your system - -## BUILD GRIDDYN with the Octave interface - -In cmake turn on the BUILD_OCTAVE_INTERFACE option - -a file griddyn.oct will be created and placed in /octave directory along with the needed libraries diff --git a/interfaces/octave/generateOCTcreationScript.cmake b/interfaces/octave/generateOCTcreationScript.cmake deleted file mode 100644 index e237f98f8..000000000 --- a/interfaces/octave/generateOCTcreationScript.cmake +++ /dev/null @@ -1,5 +0,0 @@ -get_filename_component(LIBRARY_BUILD_LOCATION ${LIBRARY_FILE} DIRECTORY) -get_filename_component(LIBRARY_NAME ${LIBRARY_FILE} NAME_WE) - -get_filename_component(BUILD_DIR ${BUILD_FILE} DIRECTORY) -configure_file(${SOURCE_DIR}/mkgriddynOCTFile.m.in ${BUILD_DIR}/mkgriddynOCTFile.m) diff --git a/interfaces/octave/griddynOCTAVE_wrap.cpp b/interfaces/octave/griddynOCTAVE_wrap.cpp deleted file mode 100644 index de3979117..000000000 --- a/interfaces/octave/griddynOCTAVE_wrap.cpp +++ /dev/null @@ -1,8607 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.12 - * - * This file is not intended to be easily readable and contains a number of - * coding conventions designed to improve portability and efficiency. Do not make - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. - * ----------------------------------------------------------------------------- */ - -#ifndef SWIGOCTAVE -# define SWIGOCTAVE -#endif - -#define SWIG_name_d "griddyn" -#define SWIG_name griddyn - -#define SWIG_global_name "cvar" -#define SWIG_op_prefix "op_" - -#ifdef __cplusplus -/* SwigValueWrapper is described in swig.swg */ -template -class SwigValueWrapper { - struct SwigMovePointer { - T* ptr; - SwigMovePointer(T* p): ptr(p) {} - ~SwigMovePointer() { delete ptr; } - SwigMovePointer& operator=(SwigMovePointer& rhs) - { - T* oldptr = ptr; - ptr = 0; - delete oldptr; - ptr = rhs.ptr; - rhs.ptr = 0; - return *this; - } - } pointer; - SwigValueWrapper& operator=(const SwigValueWrapper& rhs); - SwigValueWrapper(const SwigValueWrapper& rhs); - - public: - SwigValueWrapper(): pointer(0) {} - SwigValueWrapper& operator=(const T& t) - { - SwigMovePointer tmp(new T(t)); - pointer = tmp; - return *this; - } - operator T&() const { return *pointer.ptr; } - T* operator&() { return pointer.ptr; } -}; - -template -T SwigValueInit() -{ - return T(); -} -#endif - -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 - */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if defined(__GNUC__) -# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && \ - !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && \ - !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - -/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ -#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) -# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 -#endif - -/* Intel's compiler complains if a variable which was never initialised is - * cast to void, which is a common idiom which we use to indicate that we - * are aware a variable isn't used. So we just silence that warning. - * See: https://github.com/swig/swig/issues/192 for more discussion. - */ -#ifdef __INTEL_COMPILER -# pragma warning disable 592 -#endif - -#include -#include -#include -#include - -// Macro for enabling features which require Octave version >= major.minor.patch -// - Use (OCTAVE_PATCH_VERSION + 0) to handle both '' (released) and '+' (in -// development) patch numbers -#define SWIG_OCTAVE_PREREQ(major, minor, patch) \ - ((OCTAVE_MAJOR_VERSION << 16) + (OCTAVE_MINOR_VERSION << 8) + (OCTAVE_PATCH_VERSION + 0) >= \ - ((major) << 16) + ((minor) << 8) + (patch)) - -// Reconstruct Octave major, minor, and patch versions for releases prior to 3.8.1 -#if !defined(OCTAVE_MAJOR_VERSION) - -# if !defined(OCTAVE_API_VERSION_NUMBER) - -// Hack to distinguish between Octave 3.8.0, which removed OCTAVE_API_VERSION_NUMBER but did not yet -// introduce OCTAVE_MAJOR_VERSION, and Octave <= 3.2, which did not define OCTAVE_API_VERSION_NUMBER -# include -# if defined(octave_ov_h) -# define OCTAVE_MAJOR_VERSION 3 -# define OCTAVE_MINOR_VERSION 8 -# define OCTAVE_PATCH_VERSION 0 -# else - -// Hack to distinguish between Octave 3.2 and earlier versions, before OCTAVE_API_VERSION_NUMBER -// existed -# define ComplexLU __ignore -# include -# undef ComplexLU -# if defined(octave_Complex_LU_h) - -// We know only that this version is prior to Octave 3.2, i.e. OCTAVE_API_VERSION_NUMBER < 37 -# define OCTAVE_MAJOR_VERSION 3 -# define OCTAVE_MINOR_VERSION 1 -# define OCTAVE_PATCH_VERSION 99 - -# else - -// OCTAVE_API_VERSION_NUMBER == 37 -# define OCTAVE_MAJOR_VERSION 3 -# define OCTAVE_MINOR_VERSION 2 -# define OCTAVE_PATCH_VERSION 0 - -# endif // defined(octave_Complex_LU_h) - -# endif // defined(octave_ov_h) - -// Correlation between Octave API and version numbers extracted from Octave's -// ChangeLogs; version is the *earliest* released Octave with that API number -# elif OCTAVE_API_VERSION_NUMBER >= 48 -# define OCTAVE_MAJOR_VERSION 3 -# define OCTAVE_MINOR_VERSION 6 -# define OCTAVE_PATCH_VERSION 0 - -# elif OCTAVE_API_VERSION_NUMBER >= 45 -# define OCTAVE_MAJOR_VERSION 3 -# define OCTAVE_MINOR_VERSION 4 -# define OCTAVE_PATCH_VERSION 1 - -# elif OCTAVE_API_VERSION_NUMBER >= 42 -# define OCTAVE_MAJOR_VERSION 3 -# define OCTAVE_MINOR_VERSION 3 -# define OCTAVE_PATCH_VERSION 54 - -# elif OCTAVE_API_VERSION_NUMBER >= 41 -# define OCTAVE_MAJOR_VERSION 3 -# define OCTAVE_MINOR_VERSION 3 -# define OCTAVE_PATCH_VERSION 53 - -# elif OCTAVE_API_VERSION_NUMBER >= 40 -# define OCTAVE_MAJOR_VERSION 3 -# define OCTAVE_MINOR_VERSION 3 -# define OCTAVE_PATCH_VERSION 52 - -# elif OCTAVE_API_VERSION_NUMBER >= 39 -# define OCTAVE_MAJOR_VERSION 3 -# define OCTAVE_MINOR_VERSION 3 -# define OCTAVE_PATCH_VERSION 51 - -# else // OCTAVE_API_VERSION_NUMBER == 38 -# define OCTAVE_MAJOR_VERSION 3 -# define OCTAVE_MINOR_VERSION 3 -# define OCTAVE_PATCH_VERSION 50 - -# endif // !defined(OCTAVE_API_VERSION_NUMBER) - -#endif // !defined(OCTAVE_MAJOR_VERSION) - -#include -#include -#include -#include -#include -#include -#include -#if SWIG_OCTAVE_PREREQ(4, 2, 0) -# include -#else -# include -#endif -#include -#if SWIG_OCTAVE_PREREQ(4, 2, 0) -# include -#endif - -/* ----------------------------------------------------------------------------- - * swigrun.swg - * - * This file contains generic C API SWIG runtime support for pointer - * type checking. - * ----------------------------------------------------------------------------- */ - -/* This should only be incremented when either the layout of swig_type_info changes, - or for whatever reason, the runtime changes incompatibly */ -#define SWIG_RUNTIME_VERSION "4" - -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ -#ifdef SWIG_TYPE_TABLE -# define SWIG_QUOTE_STRING(x) #x -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) -#else -# define SWIG_TYPE_TABLE_NAME -#endif - -/* - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for - creating a static or dynamic library from the SWIG runtime code. - In 99.9% of the cases, SWIG just needs to declare them as 'static'. - - But only do this if strictly necessary, ie, if you have problems - with your compiler or suchlike. -*/ - -#ifndef SWIGRUNTIME -# define SWIGRUNTIME SWIGINTERN -#endif - -#ifndef SWIGRUNTIMEINLINE -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE -#endif - -/* Generic buffer size */ -#ifndef SWIG_BUFFER_SIZE -# define SWIG_BUFFER_SIZE 1024 -#endif - -/* Flags for pointer conversions */ -#define SWIG_POINTER_DISOWN 0x1 -#define SWIG_CAST_NEW_MEMORY 0x2 - -/* Flags for new pointer objects */ -#define SWIG_POINTER_OWN 0x1 - -/* - Flags/methods for returning states. - - The SWIG conversion methods, as ConvertPtr, return an integer - that tells if the conversion was successful or not. And if not, - an error code can be returned (see swigerrors.swg for the codes). - - Use the following macros/flags to set or process the returning - states. - - In old versions of SWIG, code such as the following was usually written: - - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { - // success code - } else { - //fail code - } - - Now you can be more explicit: - - int res = SWIG_ConvertPtr(obj,vptr,ty.flags); - if (SWIG_IsOK(res)) { - // success code - } else { - // fail code - } - - which is the same really, but now you can also do - - Type *ptr; - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); - if (SWIG_IsOK(res)) { - // success code - if (SWIG_IsNewObj(res) { - ... - delete *ptr; - } else { - ... - } - } else { - // fail code - } - - I.e., now SWIG_ConvertPtr can return new objects and you can - identify the case and take care of the deallocation. Of course that - also requires SWIG_ConvertPtr to return new result values, such as - - int SWIG_ConvertPtr(obj, ptr,...) { - if () { - if () { - *ptr = ; - return SWIG_NEWOBJ; - } else { - *ptr = ; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } - } - - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the - SWIG errors code. - - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code - allows to return the 'cast rank', for example, if you have this - - int food(double) - int fooi(int); - - and you call - - food(1) // cast rank '1' (1 -> 1.0) - fooi(1) // cast rank '0' - - just use the SWIG_AddCast()/SWIG_CheckState() -*/ - -#define SWIG_OK (0) -#define SWIG_ERROR (-1) -#define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) - -/* The CastRankLimit says how many bits are used for the cast rank */ -#define SWIG_CASTRANKLIMIT (1 << 8) -/* The NewMask denotes the object was created (using new/malloc) */ -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) -/* The TmpMask is for in/out typemaps that use temporal objects */ -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) -/* Simple returning values */ -#define SWIG_BADOBJ (SWIG_ERROR) -#define SWIG_OLDOBJ (SWIG_OK) -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) -/* Check, add and del mask methods */ -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) - -/* Cast-Rank Mode */ -#if defined(SWIG_CASTRANK_MODE) -# ifndef SWIG_TypeRank -# define SWIG_TypeRank unsigned long -# endif -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ -# define SWIG_MAXCASTRANK (2) -# endif -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) - 1) -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) -{ - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; -} -SWIGINTERNINLINE int SWIG_CheckState(int r) -{ - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; -} -#else /* no cast-rank mode */ -# define SWIG_AddCast(r) (r) -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) -#endif - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void* (*swig_converter_func)(void*, int*); -typedef struct swig_type_info* (*swig_dycast_func)(void**); - -/* Structure to store information on one type */ -typedef struct swig_type_info { - const char* name; /* mangled name of this type */ - const char* str; /* human readable name of this type */ - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ - struct swig_cast_info* cast; /* linked list of types that can cast into this type */ - void* clientdata; /* language specific type data */ - int owndata; /* flag if the structure owns the clientdata */ -} swig_type_info; - -/* Structure to store a type and conversion function used for casting */ -typedef struct swig_cast_info { - swig_type_info* type; /* pointer to type that is equivalent to this type */ - swig_converter_func converter; /* function to cast the void pointers */ - struct swig_cast_info* next; /* pointer to next cast in linked list */ - struct swig_cast_info* prev; /* pointer to the previous cast */ -} swig_cast_info; - -/* Structure used to store module information - * Each module generates one structure like this, and the runtime collects - * all of these structures and stores them in a circularly linked list.*/ -typedef struct swig_module_info { - swig_type_info** - types; /* Array of pointers to swig_type_info structures that are in this module */ - size_t size; /* Number of types in this module */ - struct swig_module_info* next; /* Pointer to next element in circularly linked list */ - swig_type_info** type_initial; /* Array of initially generated type structures */ - swig_cast_info** cast_initial; /* Array of initially generated casting structures */ - void* clientdata; /* Language specific module data */ -} swig_module_info; - -/* - Compare two type names skipping the space characters, therefore - "char*" == "char *" and "Class" == "Class", etc. - - Return 0 when the two name types are equivalent, as in - strncmp, but skipping ' '. -*/ -SWIGRUNTIME int SWIG_TypeNameComp(const char* f1, const char* l1, const char* f2, const char* l2) -{ - for (; (f1 != l1) && (f2 != l2); ++f1, ++f2) { - while ((*f1 == ' ') && (f1 != l1)) - ++f1; - while ((*f2 == ' ') && (f2 != l2)) - ++f2; - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; - } - return (int)((l1 - f1) - (l2 - f2)); -} - -/* - Check type equivalence in a name list like ||... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb -*/ -SWIGRUNTIME int SWIG_TypeCmp(const char* nb, const char* tb) -{ - int equiv = 1; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (equiv != 0 && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = SWIG_TypeNameComp(nb, ne, tb, te); - if (*ne) ++ne; - } - return equiv; -} - -/* - Check type equivalence in a name list like ||... - Return 0 if not equal, 1 if equal -*/ -SWIGRUNTIME int SWIG_TypeEquiv(const char* nb, const char* tb) -{ - return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; -} - -/* - Check the typename -*/ -SWIGRUNTIME swig_cast_info* SWIG_TypeCheck(const char* c, swig_type_info* ty) -{ - if (ty) { - swig_cast_info* iter = ty->cast; - while (iter) { - if (strcmp(iter->type->name, c) == 0) { - if (iter == ty->cast) return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison -*/ -SWIGRUNTIME swig_cast_info* SWIG_TypeCheckStruct(swig_type_info* from, swig_type_info* ty) -{ - if (ty) { - swig_cast_info* iter = ty->cast; - while (iter) { - if (iter->type == from) { - if (iter == ty->cast) return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Cast a pointer up an inheritance hierarchy -*/ -SWIGRUNTIMEINLINE void* SWIG_TypeCast(swig_cast_info* ty, void* ptr, int* newmemory) -{ - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); -} - -/* - Dynamic pointer casting. Down an inheritance hierarchy -*/ -SWIGRUNTIME swig_type_info* SWIG_TypeDynamicCast(swig_type_info* ty, void** ptr) -{ - swig_type_info* lastty = ty; - if (!ty || !ty->dcast) return ty; - while (ty && (ty->dcast)) { - ty = (*ty->dcast)(ptr); - if (ty) lastty = ty; - } - return lastty; -} - -/* - Return the name associated with this type -*/ -SWIGRUNTIMEINLINE const char* SWIG_TypeName(const swig_type_info* ty) -{ - return ty->name; -} - -/* - Return the pretty name associated with this type, - that is an unmangled type name in a form presentable to the user. -*/ -SWIGRUNTIME const char* SWIG_TypePrettyName(const swig_type_info* type) -{ - /* The "str" field contains the equivalent pretty names of the - type, separated by vertical-bar characters. We choose - to print the last name, as it is often (?) the most - specific. */ - if (!type) return NULL; - if (type->str != NULL) { - const char* last_name = type->str; - const char* s; - for (s = type->str; *s; s++) - if (*s == '|') last_name = s + 1; - return last_name; - } else - return type->name; -} - -/* - Set the clientdata field for a type -*/ -SWIGRUNTIME void SWIG_TypeClientData(swig_type_info* ti, void* clientdata) -{ - swig_cast_info* cast = ti->cast; - /* if (ti->clientdata == clientdata) return; */ - ti->clientdata = clientdata; - - while (cast) { - if (!cast->converter) { - swig_type_info* tc = cast->type; - if (!tc->clientdata) { - SWIG_TypeClientData(tc, clientdata); - } - } - cast = cast->next; - } -} -SWIGRUNTIME void SWIG_TypeNewClientData(swig_type_info* ti, void* clientdata) -{ - SWIG_TypeClientData(ti, clientdata); - ti->owndata = 1; -} - -/* - Search for a swig_type_info structure only by mangled name - Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info* - SWIG_MangledTypeQueryModule(swig_module_info* start, swig_module_info* end, const char* name) -{ - swig_module_info* iter = start; - do { - if (iter->size) { - size_t l = 0; - size_t r = iter->size - 1; - do { - /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - size_t i = (l + r) >> 1; - const char* iname = iter->types[i]->name; - if (iname) { - int compare = strcmp(name, iname); - if (compare == 0) { - return iter->types[i]; - } else if (compare < 0) { - if (i) { - r = i - 1; - } else { - break; - } - } else if (compare > 0) { - l = i + 1; - } - } else { - break; /* should never happen */ - } - } while (l <= r); - } - iter = iter->next; - } while (iter != end); - return 0; -} - -/* - Search for a swig_type_info structure for either a mangled name or a human readable name. - It first searches the mangled names of the types, which is a O(log #types) - If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info* - SWIG_TypeQueryModule(swig_module_info* start, swig_module_info* end, const char* name) -{ - /* STEP 1: Search the name field using binary search */ - swig_type_info* ret = SWIG_MangledTypeQueryModule(start, end, name); - if (ret) { - return ret; - } else { - /* STEP 2: If the type hasn't been found, do a complete search - of the str field (the human readable name) */ - swig_module_info* iter = start; - do { - size_t i = 0; - for (; i < iter->size; ++i) { - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) - return iter->types[i]; - } - iter = iter->next; - } while (iter != end); - } - - /* neither found a match */ - return 0; -} - -/* - Pack binary data into a string -*/ -SWIGRUNTIME char* SWIG_PackData(char* c, void* ptr, size_t sz) -{ - static const char hex[17] = "0123456789abcdef"; - const unsigned char* u = (unsigned char*)ptr; - const unsigned char* eu = u + sz; - for (; u != eu; ++u) { - unsigned char uu = *u; - *(c++) = hex[(uu & 0xf0) >> 4]; - *(c++) = hex[uu & 0xf]; - } - return c; -} - -/* - Unpack binary data from a string -*/ -SWIGRUNTIME const char* SWIG_UnpackData(const char* c, void* ptr, size_t sz) -{ - unsigned char* u = (unsigned char*)ptr; - const unsigned char* eu = u + sz; - for (; u != eu; ++u) { - char d = *(c++); - unsigned char uu; - if ((d >= '0') && (d <= '9')) - uu = (unsigned char)((d - '0') << 4); - else if ((d >= 'a') && (d <= 'f')) - uu = (unsigned char)((d - ('a' - 10)) << 4); - else - return (char*)0; - d = *(c++); - if ((d >= '0') && (d <= '9')) - uu |= (unsigned char)(d - '0'); - else if ((d >= 'a') && (d <= 'f')) - uu |= (unsigned char)(d - ('a' - 10)); - else - return (char*)0; - *u = uu; - } - return c; -} - -/* - Pack 'void *' into a string buffer. -*/ -SWIGRUNTIME char* SWIG_PackVoidPtr(char* buff, void* ptr, const char* name, size_t bsz) -{ - char* r = buff; - if ((2 * sizeof(void*) + 2) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r, &ptr, sizeof(void*)); - if (strlen(name) + 1 > (bsz - (r - buff))) return 0; - strcpy(r, name); - return buff; -} - -SWIGRUNTIME const char* SWIG_UnpackVoidPtr(const char* c, void** ptr, const char* name) -{ - if (*c != '_') { - if (strcmp(c, "NULL") == 0) { - *ptr = (void*)0; - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c, ptr, sizeof(void*)); -} - -SWIGRUNTIME char* SWIG_PackDataName(char* buff, void* ptr, size_t sz, const char* name, size_t bsz) -{ - char* r = buff; - size_t lname = (name ? strlen(name) : 0); - if ((2 * sz + 2 + lname) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r, ptr, sz); - if (lname) { - strncpy(r, name, lname + 1); - } else { - *r = 0; - } - return buff; -} - -SWIGRUNTIME const char* SWIG_UnpackDataName(const char* c, void* ptr, size_t sz, const char* name) -{ - if (*c != '_') { - if (strcmp(c, "NULL") == 0) { - memset(ptr, 0, sz); - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c, ptr, sz); -} - -#ifdef __cplusplus -} -#endif - -/* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 -#define SWIG_SystemError -10 -#define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 -#define SWIG_NullReferenceError -13 - -#if !SWIG_OCTAVE_PREREQ(3, 2, 0) -# define SWIG_DEFUN(cname, wname, doc) DEFUNX_DLD(#cname, wname, FS##cname, args, nargout, doc) -#else -# define SWIG_DEFUN(cname, wname, doc) DEFUNX_DLD(#cname, wname, G##cname, args, nargout, doc) -#endif - -SWIGRUNTIME bool SWIG_check_num_args(const char* func_name, - int num_args, - int max_args, - int min_args, - int varargs) -{ - if (num_args > max_args && !varargs) - error("function %s takes at most %i arguments", func_name, max_args); - else if (num_args < min_args) - error("function %s requires at least %i arguments", func_name, min_args); - else - return true; - return false; -} - -SWIGRUNTIME octave_value_list* SWIG_Octave_AppendOutput(octave_value_list* ovl, - const octave_value& ov) -{ - ovl->append(ov); - return ovl; -} - -SWIGRUNTIME octave_value SWIG_ErrorType(int code) -{ - switch (code) { - case SWIG_MemoryError: - return "SWIG_MemoryError"; - case SWIG_IOError: - return "SWIG_IOError"; - case SWIG_RuntimeError: - return "SWIG_RuntimeError"; - case SWIG_IndexError: - return "SWIG_IndexError"; - case SWIG_TypeError: - return "SWIG_TypeError"; - case SWIG_DivisionByZero: - return "SWIG_DivisionByZero"; - case SWIG_OverflowError: - return "SWIG_OverflowError"; - case SWIG_SyntaxError: - return "SWIG_SyntaxError"; - case SWIG_ValueError: - return "SWIG_ValueError"; - case SWIG_SystemError: - return "SWIG_SystemError"; - case SWIG_AttributeError: - return "SWIG_AttributeError"; - } - return "SWIG unknown error"; -} - -SWIGRUNTIME octave_value SWIG_Error(int code, const char* msg) -{ - octave_value type(SWIG_ErrorType(code)); - std::string r = msg; - r += " (" + type.string_value() + ")"; - error(r.c_str()); - return octave_value(r); -} - -#define SWIG_fail goto fail - -#define SWIG_Octave_ConvertPtr(obj, pptr, type, flags) \ - SWIG_Octave_ConvertPtrAndOwn(obj, pptr, type, flags, 0) -#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Octave_ConvertPtr(obj, pptr, type, flags) -#define SWIG_ConvertPtrAndOwn(obj, pptr, type, flags, own) \ - SWIG_Octave_ConvertPtrAndOwn(obj, pptr, type, flags, own) -#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Octave_ConvertPtr(obj, pptr, type, flags) -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Octave_NewPointerObj(ptr, type, flags) -#define swig_owntype int - -#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Octave_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Octave_NewPackedObj(ptr, sz, type) - -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0) -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0) - -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Octave_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Octave_NewPackedObj(ptr, sz, type) - -#define SWIG_GetModule(clientdata) SWIG_Octave_GetModule(clientdata) -#define SWIG_SetModule(clientdata, pointer) SWIG_Octave_SetModule(clientdata, pointer); -#define SWIG_MODULE_CLIENTDATA_TYPE void* - -#define Octave_Error_Occurred() 0 -#define SWIG_Octave_AddErrorMsg(msg) \ - { \ - ; \ - } - -SWIGRUNTIME swig_module_info* SWIG_Octave_GetModule(void* clientdata); -SWIGRUNTIME void SWIG_Octave_SetModule(void* clientdata, swig_module_info* pointer); - -// For backward compatibility only -#define SWIG_POINTER_EXCEPTION 0 -#define SWIG_arg_fail(arg) 0 - -// Runtime API implementation - -#include -#include -#include - -typedef octave_value_list (*octave_func)(const octave_value_list&, int); -class octave_swig_type; - -namespace Swig { - -#ifdef SWIG_DIRECTORS - -class Director; - -typedef std::map rtdir_map; -SWIGINTERN rtdir_map* get_rtdir_map(); -SWIGINTERNINLINE void set_rtdir(void* vptr, Director* d); -SWIGINTERNINLINE void erase_rtdir(void* vptr); -SWIGINTERNINLINE Director* get_rtdir(void* vptr); - -SWIGRUNTIME void swig_director_destroyed(octave_swig_type* self, Director* d); -SWIGRUNTIME octave_swig_type* swig_director_get_self(Director* d); -SWIGRUNTIME void swig_director_set_self(Director* d, octave_swig_type* self); - -#endif - -SWIGRUNTIME octave_base_value* swig_value_ref(octave_swig_type* ost); -SWIGRUNTIME octave_swig_type* swig_value_deref(octave_value ov); -SWIGRUNTIME octave_swig_type* swig_value_deref(const octave_base_value& ov); -} // namespace Swig - -#ifdef SWIG_DIRECTORS -SWIGRUNTIME void swig_acquire_ownership(void* vptr); -SWIGRUNTIME void swig_acquire_ownership_array(void* vptr); -SWIGRUNTIME void swig_acquire_ownership_obj(void* vptr, int own); -#endif - -struct swig_octave_member { - const char* name; - octave_func method; - octave_func get_method; - octave_func set_method; - int flags; // 1 static, 2 global - const char* doc; - bool is_static() const { return flags & 1; } - bool is_global() const { return flags & 2; } -}; - -struct swig_octave_class { - const char* name; - swig_type_info** type; - int director; - octave_func constructor; - const char* constructor_doc; - octave_func destructor; - const swig_octave_member* members; - const char** base_names; - const swig_type_info** base; -}; - -// octave_swig_type plays the role of both the shadow class and the class -// representation within Octave, since there is no support for classes. -// -// These should really be decoupled, with the class support added to Octave -// and the shadow class given by an m-file script. That would dramatically -// reduce the runtime complexity, and be more in line w/ other modules. - -class octave_swig_type: public octave_base_value { - struct cpp_ptr { - void* ptr; - bool destroyed; - cpp_ptr(void* _ptr): ptr(_ptr), destroyed(false) {} - }; - typedef std::pair type_ptr_pair; - - mutable swig_module_info* module; - - const swig_type_info* construct_type; // type of special type object - std::vector types; // our c++ base classes - int own; // whether we call c++ destructors when we die - - typedef std::pair member_value_pair; - typedef std::map member_map; - member_map members; - bool always_static; - - const swig_octave_member* find_member(const swig_type_info* type, const std::string& name) - { - if (!type->clientdata) return 0; - swig_octave_class* c = (swig_octave_class*)type->clientdata; - const swig_octave_member* m; - for (m = c->members; m->name; ++m) - if (m->name == name) return m; - for (int j = 0; c->base_names[j]; ++j) { - if (!c->base[j]) { - if (!module) module = SWIG_GetModule(0); - assert(module); - c->base[j] = SWIG_MangledTypeQueryModule(module, module, c->base_names[j]); - } - if (!c->base[j]) return 0; - if ((m = find_member(c->base[j], name))) return m; - } - return 0; - } - - member_value_pair* find_member(const std::string& name, bool insert_if_not_found) - { - member_map::iterator it = members.find(name); - if (it != members.end()) return &it->second; - const swig_octave_member* m; - for (unsigned int j = 0; j < types.size(); ++j) - if ((m = find_member(types[j].first, name))) - return &members.insert(std::make_pair(name, std::make_pair(m, octave_value()))) - .first->second; - if (!insert_if_not_found) return 0; - return &members[name]; - } - - const swig_type_info* find_base(const std::string& name, const swig_type_info* base) - { - if (!base) { - for (unsigned int j = 0; j < types.size(); ++j) { - assert(types[j].first->clientdata); - swig_octave_class* cj = (swig_octave_class*)types[j].first->clientdata; - if (cj->name == name) return types[j].first; - } - return 0; - } - assert(base->clientdata); - swig_octave_class* c = (swig_octave_class*)base->clientdata; - for (int j = 0; c->base_names[j]; ++j) { - if (!c->base[j]) { - if (!module) module = SWIG_GetModule(0); - assert(module); - c->base[j] = SWIG_MangledTypeQueryModule(module, module, c->base_names[j]); - } - if (!c->base[j]) return 0; - assert(c->base[j]->clientdata); - swig_octave_class* cj = (swig_octave_class*)c->base[j]->clientdata; - if (cj->name == name) return c->base[j]; - } - return 0; - } - - void load_members(const swig_octave_class* c, member_map& out) const - { - for (const swig_octave_member* m = c->members; m->name; ++m) { - if (out.find(m->name) == out.end()) - out.insert(std::make_pair(m->name, std::make_pair(m, octave_value()))); - } - for (int j = 0; c->base_names[j]; ++j) { - if (!c->base[j]) { - if (!module) module = SWIG_GetModule(0); - assert(module); - c->base[j] = SWIG_MangledTypeQueryModule(module, module, c->base_names[j]); - } - if (!c->base[j]) continue; - assert(c->base[j]->clientdata); - const swig_octave_class* cj = (const swig_octave_class*)c->base[j]->clientdata; - load_members(cj, out); - } - } - - void load_members(member_map& out) const - { - out = members; - for (unsigned int j = 0; j < types.size(); ++j) - if (types[j].first->clientdata) - load_members((const swig_octave_class*)types[j].first->clientdata, out); - } - - octave_value_list - member_invoke(member_value_pair* m, const octave_value_list& args, int nargout) - { - if (m->second.is_defined()) - return m->second.subsref("(", std::list(1, args), nargout); - else if (m->first && m->first->method) - return m->first->method(args, nargout); - error("member not defined or not invocable"); - return octave_value_list(); - } - - bool dispatch_unary_op(const std::string& symbol, octave_value& ret) const - { - octave_swig_type* nc_this = const_cast(this); - member_value_pair* m = nc_this->find_member(symbol, false); - if (!m || m->first->is_static() || m->first->is_global()) return false; - octave_value_list args; - args.append(nc_this->as_value()); - octave_value_list argout(nc_this->member_invoke(m, args, 1)); - if (argout.length() < 1) return false; - ret = argout(0); - return true; - } - - bool dispatch_binary_op(const std::string& symbol, - const octave_base_value& rhs, - octave_value& ret) const - { - octave_swig_type* nc_this = const_cast(this); - member_value_pair* m = nc_this->find_member(symbol, false); - if (!m || m->first->is_static() || m->first->is_global()) return false; - octave_value_list args; - args.append(nc_this->as_value()); - args.append(make_value_hack(rhs)); - octave_value_list argout(nc_this->member_invoke(m, args, 1)); - if (argout.length() < 1) return false; - ret = argout(0); - return true; - } - - bool dispatch_index_op(const std::string& symbol, - const octave_value_list& rhs, - octave_value_list& ret) const - { - octave_swig_type* nc_this = const_cast(this); - member_value_pair* m = nc_this->find_member(symbol, false); - if (!m || m->first->is_static() || m->first->is_global()) return false; - octave_value_list args; - args.append(nc_this->as_value()); - args.append(rhs); - octave_value_list argout(nc_this->member_invoke(m, args, 1)); - if (argout.length() >= 1) ret = argout(0); - return true; - } - - octave_value_list member_deref(member_value_pair* m, const octave_value_list& args) - { - if (m->second.is_defined()) - return m->second; - else if (m->first) { - if (m->first->get_method) - return m->first->get_method(args, 1); - else if (m->first->method) - return octave_value(new octave_builtin(m->first->method)); - } - error("undefined member"); - return octave_value_list(); - } - - static octave_value make_value_hack(const octave_base_value& x) - { - ((octave_swig_type&)x).count++; - return octave_value((octave_base_value*)&x); - } - - octave_swig_type(const octave_swig_type& x); - octave_swig_type& operator=(const octave_swig_type& rhs); - - public: - octave_swig_type(void* _ptr = 0, - const swig_type_info* _type = 0, - int _own = 0, - bool _always_static = false): - module(0), construct_type(_ptr ? 0 : _type), own(_own), always_static(_always_static) - { - if (_type || _ptr) types.push_back(std::make_pair(_type, _ptr)); -#ifdef SWIG_DIRECTORS - if (_ptr) { - Swig::Director* d = Swig::get_rtdir(_ptr); - if (d) Swig::swig_director_set_self(d, this); - } -#endif - } - - ~octave_swig_type() - { - if (own) { - ++count; - for (unsigned int j = 0; j < types.size(); ++j) { - if (!types[j].first || !types[j].first->clientdata) continue; - swig_octave_class* c = (swig_octave_class*)types[j].first->clientdata; - if (c->destructor && !types[j].second.destroyed && types[j].second.ptr) { - c->destructor(as_value(), 0); - } - } - } -#ifdef SWIG_DIRECTORS - for (unsigned int j = 0; j < types.size(); ++j) - Swig::erase_rtdir(types[j].second.ptr); -#endif - } - - dim_vector dims(void) const - { - octave_value out; - if (!dispatch_unary_op("__dims__", out)) return dim_vector(1, 1); - - // Return value should be cell or matrix of integers - if (out.is_cell()) { - const Cell& c = out.cell_value(); - int ndim = c.rows(); - if (ndim == 1 && c.columns() != 1) ndim = c.columns(); - - dim_vector d; - d.resize(ndim < 2 ? 2 : ndim); - d(0) = d(1) = 1; - - // Fill in dim_vector - for (int k = 0; k < ndim; k++) { - const octave_value& obj = c(k); - d.elem(k) = obj.int_value(); - - // __dims__ should return a cell filled with integers - if (error_state) return dim_vector(1, 1); - } - return d; - } else if (out.is_matrix_type() || out.is_numeric_type()) { - if (out.rows() == 1 || out.columns() == 1) { - Array a = out.int_vector_value(); - if (error_state) return dim_vector(1, 1); - dim_vector d; - d.resize(a.numel() < 2 ? 2 : a.numel()); - d(0) = d(1) = 1; - for (int k = 0; k < a.numel(); k++) { - d.elem(k) = a(k); - } - return d; - } else { - return dim_vector(1, 1); - } - } else { - return dim_vector(1, 1); - } - } - - octave_value as_value() - { - ++count; - return Swig::swig_value_ref(this); - } - - void incref() { ++count; } - - void decref() - { - if (!--count) delete this; - } - - long long swig_this() - { - if (!types.size()) return (long long)this; - return (long long)types[0].second.ptr; - } - const char* help_text() const - { - if (!types.size()) return 0; - if (!types[0].first->clientdata) return 0; - swig_octave_class* c = (swig_octave_class*)types[0].first->clientdata; - return c->constructor_doc; - } - - std::string swig_type_name() const - { - // * need some way to manually name subclasses. - // * eg optional first arg to subclass(), or named_subclass() - std::string ret; - for (unsigned int j = 0; j < types.size(); ++j) { - if (j) ret += "_"; - if (types[j].first->clientdata) { - swig_octave_class* c = (swig_octave_class*)types[j].first->clientdata; - ret += c->name; - } else - ret += types[j].first->name; - } - return ret; - } - - void merge(octave_swig_type& rhs) - { - rhs.own = 0; - for (unsigned int j = 0; j < rhs.types.size(); ++j) { - assert(!rhs.types[j].second.destroyed); -#ifdef SWIG_DIRECTORS - Swig::Director* d = Swig::get_rtdir(rhs.types[j].second.ptr); - if (d) Swig::swig_director_set_self(d, this); -#endif - } - types.insert(types.end(), rhs.types.begin(), rhs.types.end()); - members.insert(rhs.members.begin(), rhs.members.end()); - rhs.types.clear(); - rhs.members.clear(); - } - - typedef member_map::const_iterator swig_member_const_iterator; - swig_member_const_iterator swig_members_begin() { return members.begin(); } - swig_member_const_iterator swig_members_end() { return members.end(); } - - int cast(void** vptr, swig_type_info* type, int* _own, int flags) - { - int res = SWIG_ERROR; - if (_own) *_own = own; - if (flags & SWIG_POINTER_DISOWN) own = 0; - if (!type && types.size()) { - if (vptr) *vptr = types[0].second.ptr; - return SWIG_OK; - } - for (unsigned int j = 0; j < types.size(); ++j) - if (type == types[j].first) { - if (vptr) *vptr = types[j].second.ptr; - return SWIG_OK; - } - for (unsigned int j = 0; j < types.size(); ++j) { - swig_cast_info* tc = SWIG_TypeCheck(types[j].first->name, type); - if (!tc) continue; - if (vptr) { - int newmemory = 0; - *vptr = SWIG_TypeCast(tc, types[j].second.ptr, &newmemory); - if (newmemory == SWIG_CAST_NEW_MEMORY) { - assert(_own); /* badly formed typemap which will lead to a memory leak - it must - set and use own to delete *ptr */ - if (_own) *_own = *_own | SWIG_CAST_NEW_MEMORY; - } - } - res = SWIG_OK; - break; - } - return res; - } - - bool is_owned() const { return own; } - -#ifdef SWIG_DIRECTORS - void director_destroyed(Swig::Director* d) - { - bool found = false; - for (unsigned int j = 0; j < types.size(); ++j) { - Swig::Director* dj = Swig::get_rtdir(types[j].second.ptr); - if (dj == d) { - types[j].second.destroyed = true; - found = true; - } - } - assert(found); - } -#endif - - void assign(const std::string& name, const octave_value& ov) - { - members[name] = std::make_pair((const swig_octave_member*)0, ov); - } - - void assign(const std::string& name, const swig_octave_member* m) - { - members[name] = std::make_pair(m, octave_value()); - } - - octave_base_value* clone() const - { - // pass-by-value is probably not desired, and is harder; - // requires calling copy constructors of contained types etc. - assert(0); - *(int*)0 = 0; - return 0; - } - - octave_base_value* empty_clone() const { return new octave_swig_type(); } - - bool is_defined() const { return true; } - - virtual bool is_map() const { return true; } - - virtual octave_value subsref(const std::string& ops, const std::list& idx) - { - octave_value_list ovl = subsref(ops, idx, 1); - return ovl.length() ? ovl(0) : octave_value(); - } - - virtual octave_value_list - subsref(const std::string& ops, const std::list& idx, int nargout) - { - assert(ops.size() > 0); - assert(ops.size() == idx.size()); - - std::list::const_iterator idx_it = idx.begin(); - int skip = 0; - octave_value_list sub_ovl; - - // constructor invocation - if (ops[skip] == '(' && construct_type) { - assert(construct_type->clientdata); - swig_octave_class* c = (swig_octave_class*)construct_type->clientdata; - if (!c->constructor) { - error("cannot create instance"); - return octave_value_list(); - } - octave_value_list args; - if (c->director) args.append(Swig::swig_value_ref(new octave_swig_type(this, 0, 0))); - args.append(*idx_it++); - ++skip; - sub_ovl = c->constructor(args, nargout); - } - // member dereference or invocation - else if (ops[skip] == '.') { - std::string subname; - const swig_type_info* base = 0; // eg, a.base.base_cpp_mem - for (;;) { - octave_value_list subname_ovl(*idx_it++); - ++skip; - assert(subname_ovl.length() == 1 && subname_ovl(0).is_string()); - subname = subname_ovl(0).string_value(); - - const swig_type_info* next_base = find_base(subname, base); - if (!next_base || skip >= (int)ops.size() || ops[skip] != '.') break; - base = next_base; - } - - member_value_pair tmp, *m = &tmp; - if (!base || !(m->first = find_member(base, subname))) m = find_member(subname, false); - if (!m) { - error("member not found"); - return octave_value_list(); - } - - octave_value_list args; - if (!always_static && (!m->first || (!m->first->is_static() && !m->first->is_global()))) - args.append(as_value()); - if (skip < (int)ops.size() && ops[skip] == '(' && - ((m->first && m->first->method) || m->second.is_function() || - m->second.is_function_handle())) { - args.append(*idx_it++); - ++skip; - sub_ovl = member_invoke(m, args, nargout); - } else { - sub_ovl = member_deref(m, args); - } - } - // index operator - else { - if (ops[skip] == '(' || ops[skip] == '{') { - const char* op_name = ops[skip] == '(' ? "__paren__" : "__brace__"; - octave_value_list args; - args.append(*idx_it++); - ++skip; - if (!dispatch_index_op(op_name, args, sub_ovl)) { - error("error evaluating index operator"); - return octave_value_list(); - } - } else { - error("unsupported subsref"); - return octave_value_list(); - } - } - - if (skip >= (int)ops.size()) return sub_ovl; - if (sub_ovl.length() < 1) { - error("bad subs ref"); - return octave_value_list(); - } - return sub_ovl(0).next_subsref(nargout, ops, idx, skip); - } - - octave_value subsasgn(const std::string& ops, - const std::list& idx, - const octave_value& rhs) - { - assert(ops.size() > 0); - assert(ops.size() == idx.size()); - - std::list::const_iterator idx_it = idx.begin(); - int skip = 0; - - if (ops.size() > 1) { - std::list::const_iterator last = idx.end(); - --last; - std::list next_idx(idx.begin(), last); - octave_value next_ov = subsref(ops.substr(0, ops.size() - 1), next_idx); - next_ov.subsasgn(ops.substr(ops.size() - 1), - std::list(1, *last), - rhs); - } - - else if (ops[skip] == '(' || ops[skip] == '{') { - const char* op_name = ops[skip] == '(' ? "__paren_asgn__" : "__brace_asgn__"; - member_value_pair* m = find_member(op_name, false); - if (m) { - octave_value_list args; - args.append(as_value()); - args.append(*idx_it); - args.append(rhs); - member_invoke(m, args, 1); - } else - error("%s member not found", op_name); - } - - else if (ops[skip] == '.') { - octave_value_list subname_ovl(*idx_it++); - ++skip; - assert(subname_ovl.length() == 1 && subname_ovl(0).is_string()); - std::string subname = subname_ovl(0).string_value(); - - member_value_pair* m = find_member(subname, true); - if (!m->first || !m->first->set_method) { - m->first = 0; - m->second = rhs; - } else if (m->first->set_method) { - octave_value_list args; - if (!m->first->is_static() && !m->first->is_global()) args.append(as_value()); - args.append(rhs); - m->first->set_method(args, 1); - } else - error("member not assignable"); - } else - error("unsupported subsasgn"); - - return as_value(); - } - - virtual bool is_object() const { return true; } - - virtual bool is_string() const - { - octave_swig_type* nc_this = const_cast(this); - return !!nc_this->find_member("__str__", false); - } - - virtual std::string string_value(bool force = false) const - { - octave_value ret; - if (!dispatch_unary_op("__str__", ret)) { - error("__str__ method not defined"); - return std::string(); - } - if (!ret.is_string()) { - error("__str__ method did not return a string"); - return std::string(); - } - return ret.string_value(); - } - - virtual double scalar_value(bool frc_str_conv = false) const - { - octave_value ret; - if (!dispatch_unary_op("__float__", ret)) { - error("__float__ method not defined"); - } - return ret.scalar_value(); - } - -#if SWIG_OCTAVE_PREREQ(4, 2, 0) - virtual octave_value as_double(void) const - { - octave_value ret; - if (!dispatch_unary_op("__float__", ret)) { - error("__float__ method not defined"); - } - return ret.as_double(); - } - - virtual octave_value as_single(void) const - { - octave_value ret; - if (!dispatch_unary_op("__float__", ret)) { - error("__float__ method not defined"); - } - return ret.as_single(); - } -#endif - -#if SWIG_OCTAVE_PREREQ(3, 8, 0) - virtual octave_value map(octave_base_value::unary_mapper_t umap) const - { - const std::string opname = - std::string("__") + octave_base_value::get_umap_name(umap) + std::string("__"); - octave_value ret; - if (!dispatch_unary_op(opname, ret)) { - error((opname + std::string(" method not found")).c_str()); - return octave_value(); - } - return ret; - } -#endif - -#if SWIG_OCTAVE_PREREQ(3, 3, 52) - virtual octave_map map_value() const { return octave_map(); } -#else - virtual Octave_map map_value() const { return Octave_map(); } -#endif - - virtual string_vector map_keys() const - { - member_map tmp; - load_members(tmp); - - string_vector keys(tmp.size()); - int k = 0; - for (member_map::iterator it = tmp.begin(); it != tmp.end(); ++it) - keys(k++) = it->first; - - return keys; - } - - virtual bool save_ascii(std::ostream& os) { return true; } - - virtual bool load_ascii(std::istream& is) { return true; } - - virtual bool save_binary(std::ostream& os, bool& save_as_floats) { return true; } - - virtual bool load_binary(std::istream& is, bool swap, oct_mach_info::float_format fmt) - { - return true; - } - -#if defined(HAVE_HDF5) -# if SWIG_OCTAVE_PREREQ(4, 0, 0) - virtual bool save_hdf5(octave_hdf5_id loc_id, const char* name, bool save_as_floats) - { - return true; - } - - virtual bool load_hdf5(octave_hdf5_id loc_id, const char* name, bool have_h5giterate_bug) - { - return true; - } -# else - virtual bool save_hdf5(hid_t loc_id, const char* name, bool save_as_floats) { return true; } - - virtual bool load_hdf5(hid_t loc_id, const char* name, bool have_h5giterate_bug) - { - return true; - } -# endif -#endif - - virtual octave_value convert_to_str(bool pad = false, bool force = false, char type = '"') const - { - return string_value(); - } - - virtual octave_value convert_to_str_internal(bool pad, bool force, char type) const - { - return string_value(); - } - - static bool dispatch_global_op(const std::string& symbol, - const octave_value_list& args, - octave_value& ret) - { - // we assume that SWIG_op_prefix-prefixed functions are installed in global namespace - // (rather than any module namespace). - - octave_function* fcn = is_valid_function(symbol, std::string(), false); - if (!fcn) return false; - ret = fcn->do_multi_index_op(1, args)(0); - return true; - } - - static octave_value dispatch_unary_op(const octave_base_value& x, const char* op_name) - { - octave_swig_type* ost = Swig::swig_value_deref(x); - assert(ost); - - octave_value ret; - if (ost->dispatch_unary_op(std::string("__") + op_name + std::string("__"), ret)) - return ret; - std::string symbol = SWIG_op_prefix + ost->swig_type_name() + "_" + op_name; - octave_value_list args; - args.append(make_value_hack(x)); - if (dispatch_global_op(symbol, args, ret)) return ret; - - error("could not dispatch unary operator"); - return octave_value(); - } - - static octave_value dispatch_binary_op(const octave_base_value& lhs, - const octave_base_value& rhs, - const char* op_name) - { - octave_swig_type* lhs_ost = Swig::swig_value_deref(lhs); - octave_swig_type* rhs_ost = Swig::swig_value_deref(rhs); - - octave_value ret; - if (lhs_ost && - lhs_ost->dispatch_binary_op(std::string("__") + op_name + std::string("__"), rhs, ret)) - return ret; - if (rhs_ost) { - if (strlen(op_name) == 2 && (op_name[1] == 't' || op_name[1] == 'e')) { - if (op_name[0] == 'l' && - rhs_ost->dispatch_binary_op(std::string("__g") + op_name[1] + std::string("__"), - lhs, - ret)) - return ret; - if (op_name[0] == 'g' && - rhs_ost->dispatch_binary_op(std::string("__l") + op_name[1] + std::string("__"), - lhs, - ret)) - return ret; - } - if (rhs_ost->dispatch_binary_op(std::string("__r") + op_name + std::string("__"), - lhs, - ret)) - return ret; - } - - std::string symbol; - octave_value_list args; - args.append(make_value_hack(lhs)); - args.append(make_value_hack(rhs)); - - symbol = SWIG_op_prefix; - symbol += lhs_ost ? lhs_ost->swig_type_name() : lhs.type_name(); - symbol += "_"; - symbol += op_name; - symbol += "_"; - symbol += rhs_ost ? rhs_ost->swig_type_name() : rhs.type_name(); - if (dispatch_global_op(symbol, args, ret)) return ret; - - symbol = SWIG_op_prefix; - symbol += lhs_ost ? lhs_ost->swig_type_name() : lhs.type_name(); - symbol += "_"; - symbol += op_name; - symbol += "_"; - symbol += "any"; - if (dispatch_global_op(symbol, args, ret)) return ret; - - symbol = SWIG_op_prefix; - symbol += "any"; - symbol += "_"; - symbol += op_name; - symbol += "_"; - symbol += rhs_ost ? rhs_ost->swig_type_name() : rhs.type_name(); - if (dispatch_global_op(symbol, args, ret)) return ret; - - error("could not dispatch binary operator"); - return octave_value(); - } - -#if SWIG_OCTAVE_PREREQ(4, 0, 0) - void print(std::ostream& os, bool pr_as_read_syntax = false) -#else - void print(std::ostream& os, bool pr_as_read_syntax = false) const -#endif - { - if (is_string()) { - os << string_value(); - return; - } - - member_map tmp; - load_members(tmp); - - indent(os); - os << "{"; - newline(os); - increment_indent_level(); - for (unsigned int j = 0; j < types.size(); ++j) { - indent(os); - if (types[j].first->clientdata) { - const swig_octave_class* c = (const swig_octave_class*)types[j].first->clientdata; - os << c->name << ", ptr = " << types[j].second.ptr; - newline(os); - } else { - os << types[j].first->name << ", ptr = " << types[j].second.ptr; - newline(os); - } - } - for (member_map::const_iterator it = tmp.begin(); it != tmp.end(); ++it) { - indent(os); - if (it->second.first) { - const char* objtype = it->second.first->method ? "method" : "variable"; - const char* modifier = (it->second.first->flags & 1) ? "static " : - (it->second.first->flags & 2) ? "global " : - ""; - os << it->second.first->name << " (" << modifier << objtype << ")"; - newline(os); - assert(it->second.first->name == it->first); - } else { - os << it->first; - newline(os); - } - } - decrement_indent_level(); - indent(os); - os << "}"; - newline(os); - } -}; - -// Octave tries hard to preserve pass-by-value semantics. Eg, assignments -// will call clone() via make_unique() if there is more than one outstanding -// reference to the lhs, and forces the clone's reference count to 1 -// (so you can't just increment your own count and return this). -// -// One way to fix this (without modifying Octave) is to add a level of -// indirection such that clone copies ref-counted pointer and we keep -// pass-by-ref semantics (which are more natural/expected for C++ bindings). -// -// Supporting both pass-by-{ref,value} and toggling via %feature/option -// might be nice. - -class octave_swig_ref: public octave_base_value { - octave_swig_type* ptr; - - public: - octave_swig_ref(octave_swig_type* _ptr = 0): ptr(_ptr) {} - - ~octave_swig_ref() - { - if (ptr) ptr->decref(); - } - - octave_swig_type* get_ptr() const { return ptr; } - - octave_base_value* clone() const - { - if (ptr) ptr->incref(); - return new octave_swig_ref(ptr); - } - - octave_base_value* empty_clone() const { return new octave_swig_ref(0); } - - dim_vector dims(void) const { return ptr->dims(); } - - bool is_defined() const { return ptr->is_defined(); } - - virtual bool is_map() const { return ptr->is_map(); } - - virtual octave_value subsref(const std::string& ops, const std::list& idx) - { - return ptr->subsref(ops, idx); - } - - virtual octave_value_list - subsref(const std::string& ops, const std::list& idx, int nargout) - { - return ptr->subsref(ops, idx, nargout); - } - - octave_value subsasgn(const std::string& ops, - const std::list& idx, - const octave_value& rhs) - { - return ptr->subsasgn(ops, idx, rhs); - } - - virtual bool is_object() const { return ptr->is_object(); } - - virtual bool is_string() const { return ptr->is_string(); } - - virtual std::string string_value(bool force = false) const { return ptr->string_value(force); } - - virtual double scalar_value(bool frc_str_conv = false) const - { - return ptr->scalar_value(frc_str_conv); - } - -#if SWIG_OCTAVE_PREREQ(4, 2, 0) - virtual octave_value as_double(void) const { return ptr->as_double(); } - - virtual octave_value as_single(void) const { return ptr->as_single(); } -#endif - -#if SWIG_OCTAVE_PREREQ(3, 8, 0) - virtual octave_value map(octave_base_value::unary_mapper_t umap) const - { - return ptr->map(umap); - } -#endif - -#if SWIG_OCTAVE_PREREQ(3, 3, 52) - virtual octave_map map_value() const { return ptr->map_value(); } -#else - virtual Octave_map map_value() const { return ptr->map_value(); } -#endif - - virtual string_vector map_keys() const { return ptr->map_keys(); } - - virtual bool save_ascii(std::ostream& os) { return ptr->save_ascii(os); } - - virtual bool load_ascii(std::istream& is) { return ptr->load_ascii(is); } - - virtual bool save_binary(std::ostream& os, bool& save_as_floats) - { - return ptr->save_binary(os, save_as_floats); - } - - virtual bool load_binary(std::istream& is, bool swap, oct_mach_info::float_format fmt) - { - return ptr->load_binary(is, swap, fmt); - } - -#if defined(HAVE_HDF5) -# if SWIG_OCTAVE_PREREQ(4, 0, 0) - virtual bool save_hdf5(octave_hdf5_id loc_id, const char* name, bool save_as_floats) - { - return ptr->save_hdf5(loc_id, name, save_as_floats); - } - - virtual bool load_hdf5(octave_hdf5_id loc_id, const char* name, bool have_h5giterate_bug) - { - return ptr->load_hdf5(loc_id, name, have_h5giterate_bug); - } -# else - virtual bool save_hdf5(hid_t loc_id, const char* name, bool save_as_floats) - { - return ptr->save_hdf5(loc_id, name, save_as_floats); - } - - virtual bool load_hdf5(hid_t loc_id, const char* name, bool have_h5giterate_bug) - { - return ptr->load_hdf5(loc_id, name, have_h5giterate_bug); - } -# endif -#endif - - virtual octave_value convert_to_str(bool pad = false, bool force = false, char type = '"') const - { - return ptr->convert_to_str(pad, force, type); - } - - virtual octave_value convert_to_str_internal(bool pad, bool force, char type) const - { - return ptr->convert_to_str_internal(pad, force, type); - } - -#if SWIG_OCTAVE_PREREQ(4, 0, 0) - void print(std::ostream& os, bool pr_as_read_syntax = false) -#else - void print(std::ostream& os, bool pr_as_read_syntax = false) const -#endif - { - return ptr->print(os, pr_as_read_syntax); - } - - virtual type_conv_info numeric_conversion_function(void) const - { - return octave_base_value::type_conv_info(default_numeric_conversion_function, - octave_scalar::static_type_id()); - } - - private: - static octave_base_value* default_numeric_conversion_function(const octave_base_value& a) - { - const octave_swig_ref& v = dynamic_cast(a); - return new octave_scalar(v.scalar_value()); - } - -#if !SWIG_OCTAVE_PREREQ(4, 0, 0) - DECLARE_OCTAVE_ALLOCATOR; -#endif - DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA; -}; -#if !SWIG_OCTAVE_PREREQ(4, 0, 0) -DEFINE_OCTAVE_ALLOCATOR(octave_swig_ref); -#endif -DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(octave_swig_ref, "swig_ref", "swig_ref"); - -class octave_swig_packed: public octave_base_value { - swig_type_info* type; - std::vector buf; - - public: - octave_swig_packed(swig_type_info* _type = 0, const void* _buf = 0, size_t _buf_len = 0): - type(_type), buf((const char*)_buf, (const char*)_buf + _buf_len) - { - } - - bool copy(swig_type_info* outtype, void* ptr, size_t sz) const - { - if (outtype && outtype != type) return false; - assert(sz <= buf.size()); - std::copy(buf.begin(), buf.begin() + sz, (char*)ptr); - return true; - } - - octave_base_value* clone() const { return new octave_swig_packed(*this); } - - octave_base_value* empty_clone() const { return new octave_swig_packed(); } - - bool is_defined() const { return true; } - -#if SWIG_OCTAVE_PREREQ(4, 0, 0) - void print(std::ostream& os, bool pr_as_read_syntax = false) -#else - void print(std::ostream& os, bool pr_as_read_syntax = false) const -#endif - { - indent(os); - os << "swig packed type: name = " << (type ? type->name : std::string()) - << ", len = " << buf.size(); - newline(os); - } - - virtual bool save_ascii(std::ostream& os) { return true; } - - virtual bool load_ascii(std::istream& is) { return true; } - - virtual bool save_binary(std::ostream& os, bool& save_as_floats) { return true; } - - virtual bool load_binary(std::istream& is, bool swap, oct_mach_info::float_format fmt) - { - return true; - } - -#if defined(HAVE_HDF5) -# if SWIG_OCTAVE_PREREQ(4, 0, 0) - virtual bool save_hdf5(octave_hdf5_id loc_id, const char* name, bool save_as_floats) - { - return true; - } - - virtual bool load_hdf5(octave_hdf5_id loc_id, const char* name, bool have_h5giterate_bug) - { - return true; - } -# else - virtual bool save_hdf5(hid_t loc_id, const char* name, bool save_as_floats) { return true; } - - virtual bool load_hdf5(hid_t loc_id, const char* name, bool have_h5giterate_bug) - { - return true; - } -# endif -#endif - - private: -#if !SWIG_OCTAVE_PREREQ(4, 0, 0) - DECLARE_OCTAVE_ALLOCATOR; -#endif - DECLARE_OV_TYPEID_FUNCTIONS_AND_DATA; -}; -#if !SWIG_OCTAVE_PREREQ(4, 0, 0) -DEFINE_OCTAVE_ALLOCATOR(octave_swig_packed); -#endif -DEFINE_OV_TYPEID_FUNCTIONS_AND_DATA(octave_swig_packed, "swig_packed", "swig_packed"); - -SWIGRUNTIME octave_value_list octave_set_immutable(const octave_value_list& args, int nargout) -{ - error("attempt to set immutable member variable"); - return octave_value_list(); -} - -struct octave_value_ref { - const octave_value_list& ovl; - int j; - - octave_value_ref(const octave_value_list& _ovl, int _j): ovl(_ovl), j(_j) {} - - operator octave_value() const { return ovl(j); } - - octave_value operator*() const { return ovl(j); } -}; - -namespace Swig { - -SWIGRUNTIME octave_base_value* swig_value_ref(octave_swig_type* ost) -{ - return new octave_swig_ref(ost); -} - -SWIGRUNTIME octave_swig_type* swig_value_deref(octave_value ov) -{ - if (ov.is_cell() && ov.rows() == 1 && ov.columns() == 1) ov = ov.cell_value()(0); - return swig_value_deref(*ov.internal_rep()); -} - -SWIGRUNTIME octave_swig_type* swig_value_deref(const octave_base_value& ov) -{ - if (ov.type_id() != octave_swig_ref::static_type_id()) return 0; - const octave_swig_ref* osr = static_cast(&ov); - return osr->get_ptr(); -} - -} // namespace Swig - -#define swig_unary_op(name) \ - SWIGRUNTIME octave_value swig_unary_op_##name(const octave_base_value& x) \ - { \ - return octave_swig_type::dispatch_unary_op(x, #name); \ - } -#define swig_binary_op(name) \ - SWIGRUNTIME octave_value swig_binary_op_##name(const octave_base_value& lhs, \ - const octave_base_value& rhs) \ - { \ - return octave_swig_type::dispatch_binary_op(lhs, rhs, #name); \ - } -#define swigreg_unary_op(name) \ - if (!octave_value_typeinfo::lookup_unary_op(octave_value::op_##name, tid)) \ - octave_value_typeinfo::register_unary_op(octave_value::op_##name, \ - tid, \ - swig_unary_op_##name); -#define swigreg_binary_op(name) \ - if (!octave_value_typeinfo::lookup_binary_op(octave_value::op_##name, tid1, tid2)) \ - octave_value_typeinfo::register_binary_op(octave_value::op_##name, \ - tid1, \ - tid2, \ - swig_binary_op_##name); - -swig_unary_op(not); -swig_unary_op(uplus); -swig_unary_op(uminus); -swig_unary_op(transpose); -swig_unary_op(hermitian); -swig_unary_op(incr); -swig_unary_op(decr); - -swig_binary_op(add); -swig_binary_op(sub); -swig_binary_op(mul); -swig_binary_op(div); -swig_binary_op(pow); -swig_binary_op(ldiv); -#if !SWIG_OCTAVE_PREREQ(4, 2, 0) -swig_binary_op(lshift); -swig_binary_op(rshift); -#endif -swig_binary_op(lt); -swig_binary_op(le); -swig_binary_op(eq); -swig_binary_op(ge); -swig_binary_op(gt); -swig_binary_op(ne); -swig_binary_op(el_mul); -swig_binary_op(el_div); -swig_binary_op(el_pow); -swig_binary_op(el_ldiv); -swig_binary_op(el_and); -swig_binary_op(el_or); - -SWIGRUNTIME void SWIG_InstallUnaryOps(int tid) -{ - swigreg_unary_op(not); - swigreg_unary_op(uplus); - swigreg_unary_op(uminus); - swigreg_unary_op(transpose); - swigreg_unary_op(hermitian); - swigreg_unary_op(incr); - swigreg_unary_op(decr); -} -SWIGRUNTIME void SWIG_InstallBinaryOps(int tid1, int tid2) -{ - swigreg_binary_op(add); - swigreg_binary_op(sub); - swigreg_binary_op(mul); - swigreg_binary_op(div); - swigreg_binary_op(pow); - swigreg_binary_op(ldiv); -#if !SWIG_OCTAVE_PREREQ(4, 2, 0) - swigreg_binary_op(lshift); - swigreg_binary_op(rshift); -#endif - swigreg_binary_op(lt); - swigreg_binary_op(le); - swigreg_binary_op(eq); - swigreg_binary_op(ge); - swigreg_binary_op(gt); - swigreg_binary_op(ne); - swigreg_binary_op(el_mul); - swigreg_binary_op(el_div); - swigreg_binary_op(el_pow); - swigreg_binary_op(el_ldiv); - swigreg_binary_op(el_and); - swigreg_binary_op(el_or); -} -SWIGRUNTIME void SWIG_InstallOps(int tid) -{ - // here we assume that tid are conseq integers increasing from zero, and - // that our tid is the last one. might be better to have explicit string - // list of types we should bind to, and use lookup_type to resolve their tid. - - SWIG_InstallUnaryOps(tid); - SWIG_InstallBinaryOps(tid, tid); - for (int j = 0; j < tid; ++j) { - SWIG_InstallBinaryOps(j, tid); - SWIG_InstallBinaryOps(tid, j); - } -} - -SWIGRUNTIME octave_value SWIG_Octave_NewPointerObj(void* ptr, swig_type_info* type, int flags) -{ - int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; - -#ifdef SWIG_DIRECTORS - Swig::Director* d = Swig::get_rtdir(ptr); - if (d && Swig::swig_director_get_self(d)) return Swig::swig_director_get_self(d)->as_value(); -#endif - return Swig::swig_value_ref(new octave_swig_type(ptr, type, own)); -} - -SWIGRUNTIME int SWIG_Octave_ConvertPtrAndOwn(octave_value ov, - void** ptr, - swig_type_info* type, - int flags, - int* own) -{ - if (ov.is_cell() && ov.rows() == 1 && ov.columns() == 1) ov = ov.cell_value()(0); - if (!ov.is_defined() || (ov.is_matrix_type() && ov.rows() == 0 && ov.columns() == 0)) { - if (ptr) *ptr = 0; - return SWIG_OK; - } - if (ov.type_id() != octave_swig_ref::static_type_id()) return SWIG_ERROR; - octave_swig_ref* osr = static_cast(ov.internal_rep()); - octave_swig_type* ost = osr->get_ptr(); - return ost->cast(ptr, type, own, flags); -} - -SWIGRUNTIME octave_value SWIG_Octave_NewPackedObj(void* ptr, size_t sz, swig_type_info* type) -{ - return new octave_swig_packed(type, (char*)ptr, sz); -} - -SWIGRUNTIME int - SWIG_Octave_ConvertPacked(const octave_value& ov, void* ptr, size_t sz, swig_type_info* type) -{ - if (!ov.is_defined()) return SWIG_ERROR; - if (ov.type_id() != octave_swig_packed::static_type_id()) return SWIG_ERROR; - octave_swig_packed* ost = static_cast(ov.internal_rep()); - return ost->copy(type, (char*)ptr, sz) ? SWIG_OK : SWIG_ERROR; -} - -SWIGRUNTIMEINLINE void SWIG_Octave_SetConstant(octave_swig_type* module_ns, - const std::string& name, - const octave_value& ov) -{ - module_ns->assign(name, ov); -} - -SWIGRUNTIMEINLINE octave_value SWIG_Octave_GetGlobalValue(std::string name) -{ - return get_global_value(name, true); -} - -SWIGRUNTIME void SWIG_Octave_SetGlobalValue(std::string name, const octave_value& value) -{ - set_global_value(name, value); -} - -SWIGRUNTIME void SWIG_Octave_LinkGlobalValue(std::string name) -{ -#if !SWIG_OCTAVE_PREREQ(3, 2, 0) - link_to_global_variable(curr_sym_tab->lookup(name, true)); -#else -# if !SWIG_OCTAVE_PREREQ(3, 8, 0) - symbol_table::varref(name); -# endif - symbol_table::mark_global(name); -#endif -} - -SWIGRUNTIME swig_module_info* SWIG_Octave_GetModule(void* clientdata) -{ - octave_value ov = - SWIG_Octave_GetGlobalValue("__SWIG_MODULE__" SWIG_TYPE_TABLE_NAME SWIG_RUNTIME_VERSION); - if (!ov.is_defined() || ov.type_id() != octave_swig_packed::static_type_id()) return 0; - const octave_swig_packed* osp = static_cast(ov.internal_rep()); - swig_module_info* pointer = 0; - osp->copy(0, &pointer, sizeof(swig_module_info*)); - return pointer; -} - -SWIGRUNTIME void SWIG_Octave_SetModule(void* clientdata, swig_module_info* pointer) -{ - octave_value ov = new octave_swig_packed(0, &pointer, sizeof(swig_module_info*)); - SWIG_Octave_SetGlobalValue("__SWIG_MODULE__" SWIG_TYPE_TABLE_NAME SWIG_RUNTIME_VERSION, ov); -} - -#define SWIG_exception_fail(code, msg) \ - do { \ - SWIG_Error(code, msg); \ - SWIG_fail; \ - } while (0) - -#define SWIG_contract_assert(expr, msg) \ - if (!(expr)) { \ - SWIG_Error(SWIG_RuntimeError, msg); \ - SWIG_fail; \ - } else - -/* -------- TYPES TABLE (BEGIN) -------- */ - -#define SWIGTYPE_p_char swig_types[0] -#define SWIGTYPE_p_double swig_types[1] -#define SWIGTYPE_p_doubleArray swig_types[2] -#define SWIGTYPE_p_f_int_int_double__void swig_types[3] -#define SWIGTYPE_p_griddyn_status_enum swig_types[4] -#define SWIGTYPE_p_int swig_types[5] -#define SWIGTYPE_p_p_char swig_types[6] -#define SWIGTYPE_p_void swig_types[7] -static swig_type_info* swig_types[9]; -static swig_module_info swig_module = {swig_types, 8, 0, 0, 0, 0}; -#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) -#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) - -/* -------- TYPES TABLE (END) -------- */ - -#define SWIGVERSION 0x030012 -#define SWIG_VERSION SWIGVERSION - -#define SWIG_as_voidptr(a) const_cast(static_cast(a)) -#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a), reinterpret_cast(a)) - -#include - -static double* new_doublep() -{ - return new double(); -} - -static double* copy_doublep(double value) -{ - return new double(value); -} - -static void delete_doublep(double* obj) -{ - if (obj) delete obj; -} - -static void doublep_assign(double* obj, double value) -{ - *obj = value; -} - -static double doublep_value(double* obj) -{ - return *obj; -} - -SWIGINTERN int SWIG_AsVal_double(const octave_value& ov, double* val) -{ - if (!ov.is_scalar_type()) return SWIG_TypeError; - if (ov.is_complex_scalar()) return SWIG_TypeError; - if (val) *val = ov.double_value(); - return SWIG_OK; -} - -SWIGINTERNINLINE octave_value SWIG_From_double(double value) -{ - return octave_value(value); -} - -static char* new_charp() -{ - return new char(); -} - -static char* copy_charp(char value) -{ - return new char(value); -} - -static void delete_charp(char* obj) -{ - if (obj) delete obj; -} - -static void charp_assign(char* obj, char value) -{ - *obj = value; -} - -static char charp_value(char* obj) -{ - return *obj; -} - -SWIGINTERN swig_type_info* SWIG_pchar_descriptor(void) -{ - static int init = 0; - static swig_type_info* info = 0; - if (!init) { - info = SWIG_TypeQuery("_p_char"); - init = 1; - } - return info; -} - -SWIGINTERNINLINE octave_value SWIG_FromCharPtrAndSize(const char* carray, size_t size) -{ - return std::string(carray, carray + size); -} - -SWIGINTERNINLINE octave_value SWIG_FromCharPtr(const char* cptr) -{ - return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); -} - -SWIGINTERN int SWIG_AsCharPtrAndSize(octave_value ov, char** cptr, size_t* psize, int* alloc) -{ - if (ov.is_cell() && ov.rows() == 1 && ov.columns() == 1) ov = ov.cell_value()(0); - if (!ov.is_string()) return SWIG_TypeError; - - std::string str = ov.string_value(); - size_t len = str.size(); - char* cstr = (char*)str.c_str(); - if (alloc) { - *cptr = reinterpret_cast(memcpy(new char[len + 1], cstr, sizeof(char) * (len + 1))); - *alloc = SWIG_NEWOBJ; - } else if (cptr) - *cptr = cstr; - if (psize) *psize = len + 1; - return SWIG_OK; -} - -SWIGINTERN int SWIG_AsCharArray(octave_value obj, char* val, size_t size) -{ - char* cptr = 0; - size_t csize = 0; - int alloc = SWIG_OLDOBJ; - int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc); - if (SWIG_IsOK(res)) { - /* special case of single char conversion when we don't need space for NUL */ - if (size == 1 && csize == 2 && cptr && !cptr[1]) --csize; - if (csize <= size) { - if (val) { - if (csize) memcpy(val, cptr, csize * sizeof(char)); - if (csize < size) memset(val + csize, 0, (size - csize) * sizeof(char)); - } - if (alloc == SWIG_NEWOBJ) { - delete[] cptr; - res = SWIG_DelNewMask(res); - } - return res; - } - if (alloc == SWIG_NEWOBJ) delete[] cptr; - } - return SWIG_TypeError; -} - -#include -#if !defined(SWIG_NO_LLONG_MAX) -# if !defined(LLONG_MAX) && defined(__GNUC__) && defined(__LONG_LONG_MAX__) -# define LLONG_MAX __LONG_LONG_MAX__ -# define LLONG_MIN (-LLONG_MAX - 1LL) -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) -# endif -#endif - -SWIGINTERN int SWIG_AsVal_long(const octave_value& ov, long* val) -{ - if (!ov.is_scalar_type()) return SWIG_TypeError; - if (ov.is_complex_scalar()) return SWIG_TypeError; - if (ov.is_double_type() || ov.is_single_type()) { - double v = ov.double_value(); - if (v != floor(v)) return SWIG_TypeError; - } - if (val) *val = ov.long_value(); - return SWIG_OK; -} - -SWIGINTERN int SWIG_AsVal_char(octave_value obj, char* val) -{ - int res = SWIG_AsCharArray(obj, val, 1); - if (!SWIG_IsOK(res)) { - long v; - res = SWIG_AddCast(SWIG_AsVal_long(obj, &v)); - if (SWIG_IsOK(res)) { - if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) { - if (val) *val = static_cast(v); - } else { - res = SWIG_OverflowError; - } - } - } - return res; -} - -SWIGINTERNINLINE octave_value SWIG_From_char(char c) -{ - return SWIG_FromCharPtrAndSize(&c, 1); -} - -typedef double doubleArray; - -SWIGINTERN int SWIG_AsVal_unsigned_SS_long(const octave_value& ov, unsigned long* val) -{ - if (!ov.is_scalar_type()) return SWIG_TypeError; - if (ov.is_complex_scalar()) return SWIG_TypeError; - if (ov.is_double_type() || ov.is_single_type()) { - double v = ov.double_value(); - if (v < 0) return SWIG_OverflowError; - if (v != floor(v)) return SWIG_TypeError; - } - if (ov.is_int8_type() || ov.is_int16_type() || ov.is_int32_type()) { - long v = ov.long_value(); - if (v < 0) return SWIG_OverflowError; - } - if (ov.is_int64_type()) { - long long v = ov.int64_scalar_value().value(); - if (v < 0) return SWIG_OverflowError; - } - if (val) *val = ov.ulong_value(); - return SWIG_OK; -} - -#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) -# define SWIG_LONG_LONG_AVAILABLE -#endif - -#ifdef SWIG_LONG_LONG_AVAILABLE -SWIGINTERN int SWIG_AsVal_unsigned_SS_long_SS_long(const octave_value& ov, unsigned long long* val) -{ - if (!ov.is_scalar_type()) return SWIG_TypeError; - if (ov.is_complex_scalar()) return SWIG_TypeError; - if (ov.is_double_type() || ov.is_single_type()) { - double v = ov.double_value(); - if (v < 0) return SWIG_OverflowError; - if (v != floor(v)) return SWIG_TypeError; - } - if (ov.is_int8_type() || ov.is_int16_type() || ov.is_int32_type()) { - long v = ov.long_value(); - if (v < 0) return SWIG_OverflowError; - } - if (ov.is_int64_type()) { - long long v = ov.int64_scalar_value().value(); - if (v < 0) return SWIG_OverflowError; - } - if (val) { - if (ov.is_int64_type()) - *val = ov.int64_scalar_value().value(); - else if (ov.is_uint64_type()) - *val = ov.uint64_scalar_value().value(); - else - *val = ov.long_value(); - } - return SWIG_OK; -} -#endif - -SWIGINTERNINLINE int SWIG_AsVal_size_t(octave_value obj, size_t* val) -{ - int res = SWIG_TypeError; -#ifdef SWIG_LONG_LONG_AVAILABLE - if (sizeof(size_t) <= sizeof(unsigned long)) { -#endif - unsigned long v; - res = SWIG_AsVal_unsigned_SS_long(obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast(v); -#ifdef SWIG_LONG_LONG_AVAILABLE - } else if (sizeof(size_t) <= sizeof(unsigned long long)) { - unsigned long long v; - res = SWIG_AsVal_unsigned_SS_long_SS_long(obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = static_cast(v); - } -#endif - return res; -} - -SWIGINTERN doubleArray* new_doubleArray(size_t nelements) -{ - return (new double[nelements]()); -} -SWIGINTERN void delete_doubleArray(doubleArray* self) -{ - delete[] self; -} -SWIGINTERN double doubleArray___paren__(doubleArray* self, size_t index) -{ - return self[index]; -} -SWIGINTERN void doubleArray___paren_asgn__(doubleArray* self, size_t index, double value) -{ - self[index] = value; -} -SWIGINTERN double* doubleArray_cast(doubleArray* self) -{ - return self; -} -SWIGINTERN doubleArray* doubleArray_frompointer(double* t) -{ - return static_cast(t); -} - -SWIGINTERN int SWIG_AsVal_int(octave_value obj, int* val) -{ - long v; - int res = SWIG_AsVal_long(obj, &v); - if (SWIG_IsOK(res)) { - if ((v < INT_MIN || v > INT_MAX)) { - return SWIG_OverflowError; - } else { - if (val) *val = static_cast(v); - } - } - return res; -} - -SWIGINTERNINLINE octave_value SWIG_From_long(long value) -{ - return octave_value(value); -} - -SWIGINTERNINLINE octave_value SWIG_From_int(int value) -{ - return SWIG_From_long(value); -} - -#include "griddyn_export.h" -#include "griddyn_export_advanced.h" - -SWIG_DEFUN(new_doublep, _wrap_new_doublep, std::string()) -{ - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - double* result = 0; - - if (!SWIG_check_num_args("new_doublep", args.length(), 0, 0, 0)) { - SWIG_fail; - } - result = (double*)new_doublep(); - _outv = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(copy_doublep, _wrap_copy_doublep, std::string()) -{ - double arg1; - double val1; - int ecode1 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - double* result = 0; - - if (!SWIG_check_num_args("copy_doublep", args.length(), 1, 1, 0)) { - SWIG_fail; - } - ecode1 = SWIG_AsVal_double(args(0), &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), - "in method '" - "copy_doublep" - "', argument " - "1" - " of type '" - "double" - "'"); - } - arg1 = static_cast(val1); - result = (double*)copy_doublep(arg1); - _outv = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(delete_doublep, _wrap_delete_doublep, std::string()) -{ - double* arg1 = (double*)0; - void* argp1 = 0; - int res1 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - - if (!SWIG_check_num_args("delete_doublep", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), &argp1, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "delete_doublep" - "', argument " - "1" - " of type '" - "double *" - "'"); - } - arg1 = reinterpret_cast(argp1); - delete_doublep(arg1); - _outv = octave_value(); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(doublep_assign, _wrap_doublep_assign, std::string()) -{ - double* arg1 = (double*)0; - double arg2; - void* argp1 = 0; - int res1 = 0; - double val2; - int ecode2 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - - if (!SWIG_check_num_args("doublep_assign", args.length(), 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), &argp1, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "doublep_assign" - "', argument " - "1" - " of type '" - "double *" - "'"); - } - arg1 = reinterpret_cast(argp1); - ecode2 = SWIG_AsVal_double(args(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "doublep_assign" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - doublep_assign(arg1, arg2); - _outv = octave_value(); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(doublep_value, _wrap_doublep_value, std::string()) -{ - double* arg1 = (double*)0; - void* argp1 = 0; - int res1 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - double result; - - if (!SWIG_check_num_args("doublep_value", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), &argp1, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "doublep_value" - "', argument " - "1" - " of type '" - "double *" - "'"); - } - arg1 = reinterpret_cast(argp1); - result = (double)doublep_value(arg1); - _outv = SWIG_From_double(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(new_charp, _wrap_new_charp, std::string()) -{ - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - char* result = 0; - - if (!SWIG_check_num_args("new_charp", args.length(), 0, 0, 0)) { - SWIG_fail; - } - result = (char*)new_charp(); - _outv = SWIG_FromCharPtr((const char*)result); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(copy_charp, _wrap_copy_charp, std::string()) -{ - char arg1; - char val1; - int ecode1 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - char* result = 0; - - if (!SWIG_check_num_args("copy_charp", args.length(), 1, 1, 0)) { - SWIG_fail; - } - ecode1 = SWIG_AsVal_char(args(0), &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), - "in method '" - "copy_charp" - "', argument " - "1" - " of type '" - "char" - "'"); - } - arg1 = static_cast(val1); - result = (char*)copy_charp(arg1); - _outv = SWIG_FromCharPtr((const char*)result); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(delete_charp, _wrap_delete_charp, std::string()) -{ - char* arg1 = (char*)0; - int res1; - char* buf1 = 0; - int alloc1 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - - if (!SWIG_check_num_args("delete_charp", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_AsCharPtrAndSize(args(0), &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "delete_charp" - "', argument " - "1" - " of type '" - "char *" - "'"); - } - arg1 = reinterpret_cast(buf1); - delete_charp(arg1); - _outv = octave_value(); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return _out; -fail: - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return octave_value_list(); -} - -SWIG_DEFUN(charp_assign, _wrap_charp_assign, std::string()) -{ - char* arg1 = (char*)0; - char arg2; - int res1; - char* buf1 = 0; - int alloc1 = 0; - char val2; - int ecode2 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - - if (!SWIG_check_num_args("charp_assign", args.length(), 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_AsCharPtrAndSize(args(0), &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "charp_assign" - "', argument " - "1" - " of type '" - "char *" - "'"); - } - arg1 = reinterpret_cast(buf1); - ecode2 = SWIG_AsVal_char(args(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "charp_assign" - "', argument " - "2" - " of type '" - "char" - "'"); - } - arg2 = static_cast(val2); - charp_assign(arg1, arg2); - _outv = octave_value(); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return _out; -fail: - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return octave_value_list(); -} - -SWIG_DEFUN(charp_value, _wrap_charp_value, std::string()) -{ - char* arg1 = (char*)0; - int res1; - char* buf1 = 0; - int alloc1 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - char result; - - if (!SWIG_check_num_args("charp_value", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_AsCharPtrAndSize(args(0), &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "charp_value" - "', argument " - "1" - " of type '" - "char *" - "'"); - } - arg1 = reinterpret_cast(buf1); - result = (char)charp_value(arg1); - _outv = SWIG_From_char(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return _out; -fail: - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return octave_value_list(); -} - -SWIG_DEFUN(new_doubleArray, _wrap_new_doubleArray, std::string()) -{ - size_t arg1; - size_t val1; - int ecode1 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - doubleArray* result = 0; - - if (!SWIG_check_num_args("new_doubleArray", args.length(), 1, 1, 0)) { - SWIG_fail; - } - ecode1 = SWIG_AsVal_size_t(args(0), &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), - "in method '" - "new_doubleArray" - "', argument " - "1" - " of type '" - "size_t" - "'"); - } - arg1 = static_cast(val1); - result = (doubleArray*)new_doubleArray(arg1); - _outv = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_doubleArray, 1 | 0); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(delete_doubleArray, _wrap_delete_doubleArray, std::string()) -{ - doubleArray* arg1 = (doubleArray*)0; - void* argp1 = 0; - int res1 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - - if (!SWIG_check_num_args("delete_doubleArray", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), &argp1, SWIGTYPE_p_doubleArray, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "delete_doubleArray" - "', argument " - "1" - " of type '" - "doubleArray *" - "'"); - } - arg1 = reinterpret_cast(argp1); - delete_doubleArray(arg1); - _outv = octave_value(); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(doubleArray___paren__, _wrap_doubleArray___paren__, std::string()) -{ - doubleArray* arg1 = (doubleArray*)0; - size_t arg2; - void* argp1 = 0; - int res1 = 0; - size_t val2; - int ecode2 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - double result; - - if (!SWIG_check_num_args("doubleArray___paren__", args.length(), 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), &argp1, SWIGTYPE_p_doubleArray, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "doubleArray___paren__" - "', argument " - "1" - " of type '" - "doubleArray *" - "'"); - } - arg1 = reinterpret_cast(argp1); - ecode2 = SWIG_AsVal_size_t(args(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "doubleArray___paren__" - "', argument " - "2" - " of type '" - "size_t" - "'"); - } - arg2 = static_cast(val2); - result = (double)doubleArray___paren__(arg1, arg2); - _outv = SWIG_From_double(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(doubleArray___paren_asgn__, _wrap_doubleArray___paren_asgn__, std::string()) -{ - doubleArray* arg1 = (doubleArray*)0; - size_t arg2; - double arg3; - void* argp1 = 0; - int res1 = 0; - size_t val2; - int ecode2 = 0; - double val3; - int ecode3 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - - if (!SWIG_check_num_args("doubleArray___paren_asgn__", args.length(), 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), &argp1, SWIGTYPE_p_doubleArray, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "doubleArray___paren_asgn__" - "', argument " - "1" - " of type '" - "doubleArray *" - "'"); - } - arg1 = reinterpret_cast(argp1); - ecode2 = SWIG_AsVal_size_t(args(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "doubleArray___paren_asgn__" - "', argument " - "2" - " of type '" - "size_t" - "'"); - } - arg2 = static_cast(val2); - ecode3 = SWIG_AsVal_double(args(2), &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "doubleArray___paren_asgn__" - "', argument " - "3" - " of type '" - "double" - "'"); - } - arg3 = static_cast(val3); - doubleArray___paren_asgn__(arg1, arg2, arg3); - _outv = octave_value(); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(doubleArray_cast, _wrap_doubleArray_cast, std::string()) -{ - doubleArray* arg1 = (doubleArray*)0; - void* argp1 = 0; - int res1 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - double* result = 0; - - if (!SWIG_check_num_args("doubleArray_cast", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), &argp1, SWIGTYPE_p_doubleArray, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "doubleArray_cast" - "', argument " - "1" - " of type '" - "doubleArray *" - "'"); - } - arg1 = reinterpret_cast(argp1); - result = (double*)doubleArray_cast(arg1); - _outv = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(doubleArray_frompointer, _wrap_doubleArray_frompointer, std::string()) -{ - double* arg1 = (double*)0; - void* argp1 = 0; - int res1 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - doubleArray* result = 0; - - if (!SWIG_check_num_args("doubleArray_frompointer", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), &argp1, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "doubleArray_frompointer" - "', argument " - "1" - " of type '" - "double *" - "'"); - } - arg1 = reinterpret_cast(argp1); - result = (doubleArray*)doubleArray_frompointer(arg1); - _outv = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_doubleArray, 0 | 0); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -static swig_octave_member swig_doubleArray_members[] = { - {"__paren__", _wrap_doubleArray___paren__, 0, 0, 0, 0}, - {"__paren_asgn__", _wrap_doubleArray___paren_asgn__, 0, 0, 0, 0}, - {"cast", _wrap_doubleArray_cast, 0, 0, 0, 0}, - {"frompointer", _wrap_doubleArray_frompointer, 0, 0, 1, 0}, - {0, 0, 0, 0, 0, 0}}; -static const char* swig_doubleArray_base_names[] = {0}; -static const swig_type_info* swig_doubleArray_base[] = {0}; -static swig_octave_class _wrap_class_doubleArray = {"doubleArray", - &SWIGTYPE_p_doubleArray, - 0, - _wrap_new_doubleArray, - 0, - _wrap_delete_doubleArray, - swig_doubleArray_members, - swig_doubleArray_base_names, - swig_doubleArray_base}; - -static octave_value_list _wrap_gridDynSimulationGetResults__SWIG_0(const octave_value_list& args, - int nargout) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - char* arg2 = (char*)0; - double* arg3; - int arg4; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - void* argp3 = 0; - int res3 = 0; - int val4; - int ecode4 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - int result; - - if (!SWIG_check_num_args("gridDynSimulationGetResults", args.length(), 4, 4, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationGetResults" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "gridDynSimulationGetResults" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - res3 = SWIG_ConvertPtr(args(2), &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationGetResults" - "', argument " - "3" - " of type '" - "double [0]" - "'"); - } - arg3 = reinterpret_cast(argp3); - ecode4 = SWIG_AsVal_int(args(3), &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), - "in method '" - "gridDynSimulationGetResults" - "', argument " - "4" - " of type '" - "int" - "'"); - } - arg4 = static_cast(val4); - result = (int)gridDynSimulationGetResults(arg1, (char const*)arg2, arg3, arg4); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectCreate, _wrap_GridDynObject_create, std::string()) -{ - char* arg1 = (char*)0; - char* arg2 = (char*)0; - int res1; - char* buf1 = 0; - int alloc1 = 0; - int res2; - char* buf2 = 0; - int alloc2 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - GridDynObject result; - - if (!SWIG_check_num_args("GridDynObjectCreate", args.length(), 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_AsCharPtrAndSize(args(0), &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectCreate" - "', argument " - "1" - " of type '" - "char const *" - "'"); - } - arg1 = reinterpret_cast(buf1); - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectCreate" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - result = (GridDynObject)GridDynObjectCreate((char const*)arg1, (char const*)arg2); - _outv = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return _out; -fail: - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectClone, _wrap_GridDynObject_clone, std::string()) -{ - GridDynObject arg1 = (GridDynObject)(GridDynObject)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - GridDynObject result; - - if (!SWIG_check_num_args("GridDynObjectClone", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectClone" - "', argument " - "1" - " of type '" - "GridDynObject const" - "'"); - } - result = (GridDynObject)GridDynObjectClone(arg1); - _outv = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectFree, _wrap_GridDynObject_free, std::string()) -{ - GridDynObject arg1 = (GridDynObject)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - - if (!SWIG_check_num_args("GridDynObjectFree", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectFree" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - GridDynObjectFree(arg1); - _outv = octave_value(); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectAdd, _wrap_GridDynObject_add, std::string()) -{ - GridDynObject arg1 = (GridDynObject)0; - GridDynObject arg2 = (GridDynObject)0; - int res1; - int res2; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectAdd", args.length(), 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectAdd" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_ConvertPtr(args(1), SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectAdd" - "', argument " - "2" - " of type '" - "GridDynObject" - "'"); - } - result = (griddyn_status)GridDynObjectAdd(arg1, arg2); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectRemove, _wrap_GridDynObject_remove, std::string()) -{ - GridDynObject arg1 = (GridDynObject)0; - GridDynObject arg2 = (GridDynObject)0; - int res1; - int res2; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectRemove", args.length(), 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectRemove" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_ConvertPtr(args(1), SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectRemove" - "', argument " - "2" - " of type '" - "GridDynObject" - "'"); - } - result = (griddyn_status)GridDynObjectRemove(arg1, arg2); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectSetString, _wrap_GridDynObject_setString, std::string()) -{ - GridDynObject arg1 = (GridDynObject)0; - char* arg2 = (char*)0; - char* arg3 = (char*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - int res3; - char* buf3 = 0; - int alloc3 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectSetString", args.length(), 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectSetString" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectSetString" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - res3 = SWIG_AsCharPtrAndSize(args(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynObjectSetString" - "', argument " - "3" - " of type '" - "char const *" - "'"); - } - arg3 = reinterpret_cast(buf3); - result = (griddyn_status)GridDynObjectSetString(arg1, (char const*)arg2, (char const*)arg3); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectSetValue, _wrap_GridDynObject_setValue, std::string()) -{ - GridDynObject arg1 = (GridDynObject)0; - char* arg2 = (char*)0; - double arg3; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - double val3; - int ecode3 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectSetValue", args.length(), 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectSetValue" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectSetValue" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - ecode3 = SWIG_AsVal_double(args(2), &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectSetValue" - "', argument " - "3" - " of type '" - "double" - "'"); - } - arg3 = static_cast(val3); - result = (griddyn_status)GridDynObjectSetValue(arg1, (char const*)arg2, arg3); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectSetValueUnits, _wrap_GridDynObject_setValueUnits, std::string()) -{ - GridDynObject arg1 = (GridDynObject)0; - char* arg2 = (char*)0; - double arg3; - char* arg4 = (char*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - double val3; - int ecode3 = 0; - int res4; - char* buf4 = 0; - int alloc4 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectSetValueUnits", args.length(), 4, 4, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectSetValueUnits" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectSetValueUnits" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - ecode3 = SWIG_AsVal_double(args(2), &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectSetValueUnits" - "', argument " - "3" - " of type '" - "double" - "'"); - } - arg3 = static_cast(val3); - res4 = SWIG_AsCharPtrAndSize(args(3), &buf4, NULL, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "GridDynObjectSetValueUnits" - "', argument " - "4" - " of type '" - "char const *" - "'"); - } - arg4 = reinterpret_cast(buf4); - result = (griddyn_status) - GridDynObjectSetValueUnits(arg1, (char const*)arg2, arg3, (char const*)arg4); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc4 == SWIG_NEWOBJ) delete[] buf4; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc4 == SWIG_NEWOBJ) delete[] buf4; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectSetFlag, _wrap_GridDynObject_setFlag, std::string()) -{ - GridDynObject arg1 = (GridDynObject)0; - char* arg2 = (char*)0; - int arg3; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - int val3; - int ecode3 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectSetFlag", args.length(), 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectSetFlag" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectSetFlag" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - ecode3 = SWIG_AsVal_int(args(2), &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectSetFlag" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - result = (griddyn_status)GridDynObjectSetFlag(arg1, (char const*)arg2, arg3); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectGetString, _wrap_GridDynObject_getString, std::string()) -{ - GridDynObject arg1 = (GridDynObject)(GridDynObject)0; - char* arg2 = (char*)0; - char* arg3 = (char*)0; - int arg4; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - int res3; - char* buf3 = 0; - int alloc3 = 0; - int val4; - int ecode4 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectGetString", args.length(), 4, 4, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectGetString" - "', argument " - "1" - " of type '" - "GridDynObject const" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectGetString" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - res3 = SWIG_AsCharPtrAndSize(args(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynObjectGetString" - "', argument " - "3" - " of type '" - "char *" - "'"); - } - arg3 = reinterpret_cast(buf3); - ecode4 = SWIG_AsVal_int(args(3), &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), - "in method '" - "GridDynObjectGetString" - "', argument " - "4" - " of type '" - "int" - "'"); - } - arg4 = static_cast(val4); - result = (griddyn_status)GridDynObjectGetString(arg1, (char const*)arg2, arg3, arg4); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectGetValue, _wrap_GridDynObject_getValue, std::string()) -{ - GridDynObject arg1 = (GridDynObject)(GridDynObject)0; - char* arg2 = (char*)0; - double* arg3 = (double*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - void* argp3 = 0; - int res3 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectGetValue", args.length(), 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectGetValue" - "', argument " - "1" - " of type '" - "GridDynObject const" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectGetValue" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - res3 = SWIG_ConvertPtr(args(2), &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynObjectGetValue" - "', argument " - "3" - " of type '" - "double *" - "'"); - } - arg3 = reinterpret_cast(argp3); - result = (griddyn_status)GridDynObjectGetValue(arg1, (char const*)arg2, arg3); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectGetValueUnits, _wrap_GridDynObject_getValueUnits, std::string()) -{ - GridDynObject arg1 = (GridDynObject)(GridDynObject)0; - char* arg2 = (char*)0; - char* arg3 = (char*)0; - double* arg4 = (double*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - int res3; - char* buf3 = 0; - int alloc3 = 0; - void* argp4 = 0; - int res4 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectGetValueUnits", args.length(), 4, 4, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectGetValueUnits" - "', argument " - "1" - " of type '" - "GridDynObject const" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectGetValueUnits" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - res3 = SWIG_AsCharPtrAndSize(args(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynObjectGetValueUnits" - "', argument " - "3" - " of type '" - "char const *" - "'"); - } - arg3 = reinterpret_cast(buf3); - res4 = SWIG_ConvertPtr(args(3), &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "GridDynObjectGetValueUnits" - "', argument " - "4" - " of type '" - "double *" - "'"); - } - arg4 = reinterpret_cast(argp4); - result = (griddyn_status) - GridDynObjectGetValueUnits(arg1, (char const*)arg2, (char const*)arg3, arg4); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectGetFlag, _wrap_GridDynObject_getFlag, std::string()) -{ - GridDynObject arg1 = (GridDynObject)(GridDynObject)0; - char* arg2 = (char*)0; - int* arg3 = (int*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - void* argp3 = 0; - int res3 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectGetFlag", args.length(), 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectGetFlag" - "', argument " - "1" - " of type '" - "GridDynObject const" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectGetFlag" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - res3 = SWIG_ConvertPtr(args(2), &argp3, SWIGTYPE_p_int, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynObjectGetFlag" - "', argument " - "3" - " of type '" - "int *" - "'"); - } - arg3 = reinterpret_cast(argp3); - result = (griddyn_status)GridDynObjectGetFlag(arg1, (char const*)arg2, arg3); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectFind, _wrap_GridDynObject_find, std::string()) -{ - GridDynObject arg1 = (GridDynObject)(GridDynObject)0; - char* arg2 = (char*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - GridDynObject result; - - if (!SWIG_check_num_args("GridDynObjectFind", args.length(), 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectFind" - "', argument " - "1" - " of type '" - "GridDynObject const" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectFind" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - result = (GridDynObject)GridDynObjectFind(arg1, (char const*)arg2); - _outv = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectGetSubObject, _wrap_GridDynObject_getSubObject, std::string()) -{ - GridDynObject arg1 = (GridDynObject)(GridDynObject)0; - char* arg2 = (char*)0; - int arg3; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - int val3; - int ecode3 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - GridDynObject result; - - if (!SWIG_check_num_args("GridDynObjectGetSubObject", args.length(), 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectGetSubObject" - "', argument " - "1" - " of type '" - "GridDynObject const" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectGetSubObject" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - ecode3 = SWIG_AsVal_int(args(2), &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectGetSubObject" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - result = (GridDynObject)GridDynObjectGetSubObject(arg1, (char const*)arg2, arg3); - _outv = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectFindByUserId, _wrap_GridDynObject_findByUserId, std::string()) -{ - GridDynObject arg1 = (GridDynObject)(GridDynObject)0; - char* arg2 = (char*)0; - int arg3; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - int val3; - int ecode3 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - GridDynObject result; - - if (!SWIG_check_num_args("GridDynObjectFindByUserId", args.length(), 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectFindByUserId" - "', argument " - "1" - " of type '" - "GridDynObject const" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectFindByUserId" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - ecode3 = SWIG_AsVal_int(args(2), &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectFindByUserId" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - result = (GridDynObject)GridDynObjectFindByUserId(arg1, (char const*)arg2, arg3); - _outv = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectGetParent, _wrap_GridDynObject_getParent, std::string()) -{ - GridDynObject arg1 = (GridDynObject)(GridDynObject)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - GridDynObject result; - - if (!SWIG_check_num_args("GridDynObjectGetParent", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectGetParent" - "', argument " - "1" - " of type '" - "GridDynObject const" - "'"); - } - result = (GridDynObject)GridDynObjectGetParent(arg1); - _outv = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectGetType, _wrap_GridDynObject_getType, std::string()) -{ - GridDynObject arg1 = (GridDynObject)(GridDynObject)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - char* result = 0; - - if (!SWIG_check_num_args("GridDynObjectGetType", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectGetType" - "', argument " - "1" - " of type '" - "GridDynObject const" - "'"); - } - result = (char*)GridDynObjectGetType(arg1); - _outv = SWIG_FromCharPtr((const char*)result); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationCreate, _wrap_gridDynSimulationCreate, std::string()) -{ - char* arg1 = (char*)0; - char* arg2 = (char*)0; - int res1; - char* buf1 = 0; - int alloc1 = 0; - int res2; - char* buf2 = 0; - int alloc2 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - GridDynSimulation result; - - if (!SWIG_check_num_args("gridDynSimulationCreate", args.length(), 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_AsCharPtrAndSize(args(0), &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationCreate" - "', argument " - "1" - " of type '" - "char const *" - "'"); - } - arg1 = reinterpret_cast(buf1); - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "gridDynSimulationCreate" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - result = (GridDynSimulation)gridDynSimulationCreate((char const*)arg1, (char const*)arg2); - _outv = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return _out; -fail: - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationFree, _wrap_gridDynSimulationFree, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - - if (!SWIG_check_num_args("gridDynSimulationFree", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationFree" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - gridDynSimulationFree(arg1); - _outv = octave_value(); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationInitializeFromString, - _wrap_gridDynSimulationInitializeFromString, - std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - char* arg2 = (char*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationInitializeFromString", args.length(), 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationInitializeFromString" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "gridDynSimulationInitializeFromString" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - result = (griddyn_status)gridDynSimulationInitializeFromString(arg1, (char const*)arg2); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationInitializeFromArgs, - _wrap_gridDynSimulationInitializeFromArgs, - std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int arg2; - char** arg3; - int arg4; - int res1; - int val2; - int ecode2 = 0; - void* argp3 = 0; - int res3 = 0; - int val4; - int ecode4 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationInitializeFromArgs", args.length(), 4, 4, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationInitializeFromArgs" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - ecode2 = SWIG_AsVal_int(args(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "gridDynSimulationInitializeFromArgs" - "', argument " - "2" - " of type '" - "int" - "'"); - } - arg2 = static_cast(val2); - res3 = SWIG_ConvertPtr(args(2), &argp3, SWIGTYPE_p_p_char, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationInitializeFromArgs" - "', argument " - "3" - " of type '" - "char *[]" - "'"); - } - arg3 = reinterpret_cast(argp3); - ecode4 = SWIG_AsVal_int(args(3), &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), - "in method '" - "gridDynSimulationInitializeFromArgs" - "', argument " - "4" - " of type '" - "int" - "'"); - } - arg4 = static_cast(val4); - result = (griddyn_status)gridDynSimulationInitializeFromArgs(arg1, arg2, arg3, arg4); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationLoadfile, _wrap_gridDynSimulationLoadfile, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - char* arg2 = (char*)0; - char* arg3 = (char*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - int res3; - char* buf3 = 0; - int alloc3 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationLoadfile", args.length(), 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationLoadfile" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "gridDynSimulationLoadfile" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - res3 = SWIG_AsCharPtrAndSize(args(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationLoadfile" - "', argument " - "3" - " of type '" - "char const *" - "'"); - } - arg3 = reinterpret_cast(buf3); - result = (griddyn_status)gridDynSimulationLoadfile(arg1, (char const*)arg2, (char const*)arg3); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationAddCommand, _wrap_gridDynSimulationAddCommand, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - char* arg2 = (char*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationAddCommand", args.length(), 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationAddCommand" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "gridDynSimulationAddCommand" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - result = (griddyn_status)gridDynSimulationAddCommand(arg1, (char const*)arg2); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationPowerflowInitialize, - _wrap_gridDynSimulationPowerflowInitialize, - std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationPowerflowInitialize", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationPowerflowInitialize" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (griddyn_status)gridDynSimulationPowerflowInitialize(arg1); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationPowerflow, _wrap_gridDynSimulationPowerflow, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationPowerflow", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationPowerflow" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (griddyn_status)gridDynSimulationPowerflow(arg1); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationDynamicInitialize, - _wrap_gridDynSimulationDynamicInitialize, - std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationDynamicInitialize", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationDynamicInitialize" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (griddyn_status)gridDynSimulationDynamicInitialize(arg1); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationReset, _wrap_gridDynSimulationReset, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationReset", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationReset" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (griddyn_status)gridDynSimulationReset(arg1); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationGetCurrentTime, _wrap_gridDynSimulationGetCurrentTime, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - double result; - - if (!SWIG_check_num_args("gridDynSimulationGetCurrentTime", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationGetCurrentTime" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (double)gridDynSimulationGetCurrentTime(arg1); - _outv = SWIG_From_double(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationRun, _wrap_gridDynSimulationRun, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationRun", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationRun" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (griddyn_status)gridDynSimulationRun(arg1); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationRunTo, _wrap_gridDynSimulationRunTo, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - double arg2; - int res1; - double val2; - int ecode2 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationRunTo", args.length(), 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationRunTo" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - ecode2 = SWIG_AsVal_double(args(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "gridDynSimulationRunTo" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - result = (griddyn_status)gridDynSimulationRunTo(arg1, arg2); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationStep, _wrap_gridDynSimulationStep, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationStep", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationStep" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (griddyn_status)gridDynSimulationStep(arg1); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationRunAsync, _wrap_gridDynSimulationRunAsync, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationRunAsync", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationRunAsync" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (griddyn_status)gridDynSimulationRunAsync(arg1); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationRunToAsync, _wrap_gridDynSimulationRunToAsync, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - double arg2; - int res1; - double val2; - int ecode2 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationRunToAsync", args.length(), 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationRunToAsync" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - ecode2 = SWIG_AsVal_double(args(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "gridDynSimulationRunToAsync" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - result = (griddyn_status)gridDynSimulationRunToAsync(arg1, arg2); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationStepAsync, _wrap_gridDynSimulationStepAsync, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationStepAsync", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationStepAsync" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (griddyn_status)gridDynSimulationStepAsync(arg1); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationGetStatus, _wrap_gridDynSimulationGetStatus, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - int result; - - if (!SWIG_check_num_args("gridDynSimulationGetStatus", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationGetStatus" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (int)gridDynSimulationGetStatus(arg1); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(getSimulationObject, _wrap_getSimulationObject, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - GridDynObject result; - - if (!SWIG_check_num_args("getSimulationObject", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "getSimulationObject" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (GridDynObject)getSimulationObject(arg1); - _outv = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationGetSolverKey, _wrap_gridDynSimulationGetSolverKey, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - char* arg2 = (char*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - SolverKey result; - - if (!SWIG_check_num_args("gridDynSimulationGetSolverKey", args.length(), 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationGetSolverKey" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "gridDynSimulationGetSolverKey" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - result = (SolverKey)gridDynSimulationGetSolverKey(arg1, (char const*)arg2); - _outv = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSolverKeyFree, _wrap_gridDynSolverKeyFree, std::string()) -{ - SolverKey arg1 = (SolverKey)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - - if (!SWIG_check_num_args("gridDynSolverKeyFree", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSolverKeyFree" - "', argument " - "1" - " of type '" - "SolverKey" - "'"); - } - gridDynSolverKeyFree(arg1); - _outv = octave_value(); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationStateSize, _wrap_gridDynSimulationStateSize, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - SolverKey arg2 = (SolverKey)0; - int res1; - int res2; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - int result; - - if (!SWIG_check_num_args("gridDynSimulationStateSize", args.length(), 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationStateSize" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - res2 = SWIG_ConvertPtr(args(1), SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "gridDynSimulationStateSize" - "', argument " - "2" - " of type '" - "SolverKey" - "'"); - } - result = (int)gridDynSimulationStateSize(arg1, arg2); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationBusCount, _wrap_gridDynSimulationBusCount, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - int result; - - if (!SWIG_check_num_args("gridDynSimulationBusCount", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationBusCount" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (int)gridDynSimulationBusCount(arg1); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationLineCount, _wrap_gridDynSimulationLineCount, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - int result; - - if (!SWIG_check_num_args("gridDynSimulationLineCount", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationLineCount" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - result = (int)gridDynSimulationLineCount(arg1); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -static octave_value_list _wrap_gridDynSimulationGetResults__SWIG_1(const octave_value_list& args, - int nargout) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - char* arg2 = (char*)0; - double* arg3 = (double*)0; - int arg4; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - void* argp3 = 0; - int res3 = 0; - int val4; - int ecode4 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - int result; - - if (!SWIG_check_num_args("gridDynSimulationGetResults", args.length(), 4, 4, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationGetResults" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "gridDynSimulationGetResults" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - res3 = SWIG_ConvertPtr(args(2), &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationGetResults" - "', argument " - "3" - " of type '" - "double *" - "'"); - } - arg3 = reinterpret_cast(argp3); - ecode4 = SWIG_AsVal_int(args(3), &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), - "in method '" - "gridDynSimulationGetResults" - "', argument " - "4" - " of type '" - "int" - "'"); - } - arg4 = static_cast(val4); - result = (int)gridDynSimulationGetResults(arg1, (char const*)arg2, arg3, arg4); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationGetResults, _wrap_gridDynSimulationGetResults, std::string()) -{ - int argc = args.length(); - octave_value_ref argv[4] = {octave_value_ref(args, 0), - octave_value_ref(args, 1), - octave_value_ref(args, 2), - octave_value_ref(args, 3)}; - - if (argc == 4) { - int _v; - void* ptr = 0; - int res = SWIG_ConvertPtr(argv[0], &ptr, 0, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - void* vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_gridDynSimulationGetResults__SWIG_0(args, nargout); - } - } - } - } - } - if (argc == 4) { - int _v; - void* ptr = 0; - int res = SWIG_ConvertPtr(argv[0], &ptr, 0, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - void* vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_gridDynSimulationGetResults__SWIG_1(args, nargout); - } - } - } - } - } - - error("No matching function for overload"); - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationGuessState, _wrap_gridDynSimulationGuessState, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - double arg2; - double* arg3 = (double*)0; - double* arg4 = (double*)0; - SolverKey arg5 = (SolverKey)0; - int res1; - double val2; - int ecode2 = 0; - void* argp3 = 0; - int res3 = 0; - void* argp4 = 0; - int res4 = 0; - int res5; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationGuessState", args.length(), 5, 5, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationGuessState" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - ecode2 = SWIG_AsVal_double(args(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "gridDynSimulationGuessState" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - res3 = SWIG_ConvertPtr(args(2), &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationGuessState" - "', argument " - "3" - " of type '" - "double *" - "'"); - } - arg3 = reinterpret_cast(argp3); - res4 = SWIG_ConvertPtr(args(3), &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "gridDynSimulationGuessState" - "', argument " - "4" - " of type '" - "double *" - "'"); - } - arg4 = reinterpret_cast(argp4); - res5 = SWIG_ConvertPtr(args(4), SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), - "in method '" - "gridDynSimulationGuessState" - "', argument " - "5" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status)gridDynSimulationGuessState(arg1, arg2, arg3, arg4, arg5); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationSetState, _wrap_gridDynSimulationSetState, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - double arg2; - double* arg3 = (double*)0; - double* arg4 = (double*)0; - SolverKey arg5 = (SolverKey)0; - int res1; - double val2; - int ecode2 = 0; - void* argp3 = 0; - int res3 = 0; - void* argp4 = 0; - int res4 = 0; - int res5; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationSetState", args.length(), 5, 5, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationSetState" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - ecode2 = SWIG_AsVal_double(args(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "gridDynSimulationSetState" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - res3 = SWIG_ConvertPtr(args(2), &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationSetState" - "', argument " - "3" - " of type '" - "double const *" - "'"); - } - arg3 = reinterpret_cast(argp3); - res4 = SWIG_ConvertPtr(args(3), &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "gridDynSimulationSetState" - "', argument " - "4" - " of type '" - "double const *" - "'"); - } - arg4 = reinterpret_cast(argp4); - res5 = SWIG_ConvertPtr(args(4), SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), - "in method '" - "gridDynSimulationSetState" - "', argument " - "5" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status) - gridDynSimulationSetState(arg1, arg2, (double const*)arg3, (double const*)arg4, arg5); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationGetStateVariableTypes, - _wrap_gridDynSimulationGetStateVariableTypes, - std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - double* arg2 = (double*)0; - SolverKey arg3 = (SolverKey)0; - int res1; - void* argp2 = 0; - int res2 = 0; - int res3; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationGetStateVariableTypes", args.length(), 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationGetStateVariableTypes" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - res2 = SWIG_ConvertPtr(args(1), &argp2, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "gridDynSimulationGetStateVariableTypes" - "', argument " - "2" - " of type '" - "double *" - "'"); - } - arg2 = reinterpret_cast(argp2); - res3 = SWIG_ConvertPtr(args(2), SWIG_as_voidptrptr(&arg3), 0, 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationGetStateVariableTypes" - "', argument " - "3" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status)gridDynSimulationGetStateVariableTypes(arg1, arg2, arg3); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationResidual, _wrap_gridDynSimulationResidual, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - double arg2; - double* arg3 = (double*)0; - double* arg4 = (double*)0; - double* arg5 = (double*)0; - SolverKey arg6 = (SolverKey)0; - int res1; - double val2; - int ecode2 = 0; - void* argp3 = 0; - int res3 = 0; - void* argp4 = 0; - int res4 = 0; - void* argp5 = 0; - int res5 = 0; - int res6; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationResidual", args.length(), 6, 6, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationResidual" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - ecode2 = SWIG_AsVal_double(args(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "gridDynSimulationResidual" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - res3 = SWIG_ConvertPtr(args(2), &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationResidual" - "', argument " - "3" - " of type '" - "double *" - "'"); - } - arg3 = reinterpret_cast(argp3); - res4 = SWIG_ConvertPtr(args(3), &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "gridDynSimulationResidual" - "', argument " - "4" - " of type '" - "double const *" - "'"); - } - arg4 = reinterpret_cast(argp4); - res5 = SWIG_ConvertPtr(args(4), &argp5, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), - "in method '" - "gridDynSimulationResidual" - "', argument " - "5" - " of type '" - "double const *" - "'"); - } - arg5 = reinterpret_cast(argp5); - res6 = SWIG_ConvertPtr(args(5), SWIG_as_voidptrptr(&arg6), 0, 0); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), - "in method '" - "gridDynSimulationResidual" - "', argument " - "6" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status) - gridDynSimulationResidual(arg1, arg2, arg3, (double const*)arg4, (double const*)arg5, arg6); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationDerivative, _wrap_gridDynSimulationDerivative, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - double arg2; - double* arg3 = (double*)0; - double* arg4 = (double*)0; - SolverKey arg5 = (SolverKey)0; - int res1; - double val2; - int ecode2 = 0; - void* argp3 = 0; - int res3 = 0; - void* argp4 = 0; - int res4 = 0; - int res5; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationDerivative", args.length(), 5, 5, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationDerivative" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - ecode2 = SWIG_AsVal_double(args(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "gridDynSimulationDerivative" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - res3 = SWIG_ConvertPtr(args(2), &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationDerivative" - "', argument " - "3" - " of type '" - "double *" - "'"); - } - arg3 = reinterpret_cast(argp3); - res4 = SWIG_ConvertPtr(args(3), &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "gridDynSimulationDerivative" - "', argument " - "4" - " of type '" - "double const *" - "'"); - } - arg4 = reinterpret_cast(argp4); - res5 = SWIG_ConvertPtr(args(4), SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), - "in method '" - "gridDynSimulationDerivative" - "', argument " - "5" - " of type '" - "SolverKey" - "'"); - } - result = - (griddyn_status)gridDynSimulationDerivative(arg1, arg2, arg3, (double const*)arg4, arg5); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationAlgebraicUpdate, _wrap_gridDynSimulationAlgebraicUpdate, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - double arg2; - double* arg3 = (double*)0; - double* arg4 = (double*)0; - double arg5; - SolverKey arg6 = (SolverKey)0; - int res1; - double val2; - int ecode2 = 0; - void* argp3 = 0; - int res3 = 0; - void* argp4 = 0; - int res4 = 0; - double val5; - int ecode5 = 0; - int res6; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationAlgebraicUpdate", args.length(), 6, 6, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationAlgebraicUpdate" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - ecode2 = SWIG_AsVal_double(args(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "gridDynSimulationAlgebraicUpdate" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - res3 = SWIG_ConvertPtr(args(2), &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationAlgebraicUpdate" - "', argument " - "3" - " of type '" - "double *" - "'"); - } - arg3 = reinterpret_cast(argp3); - res4 = SWIG_ConvertPtr(args(3), &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "gridDynSimulationAlgebraicUpdate" - "', argument " - "4" - " of type '" - "double const *" - "'"); - } - arg4 = reinterpret_cast(argp4); - ecode5 = SWIG_AsVal_double(args(4), &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), - "in method '" - "gridDynSimulationAlgebraicUpdate" - "', argument " - "5" - " of type '" - "double" - "'"); - } - arg5 = static_cast(val5); - res6 = SWIG_ConvertPtr(args(5), SWIG_as_voidptrptr(&arg6), 0, 0); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), - "in method '" - "gridDynSimulationAlgebraicUpdate" - "', argument " - "6" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status) - gridDynSimulationAlgebraicUpdate(arg1, arg2, arg3, (double const*)arg4, arg5, arg6); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(gridDynSimulationJacobian, _wrap_gridDynSimulationJacobian, std::string()) -{ - GridDynSimulation arg1 = (GridDynSimulation)0; - double arg2; - double* arg3 = (double*)0; - double* arg4 = (double*)0; - double arg5; - SolverKey arg6 = (SolverKey)0; - void (*arg7)(int, int, double) = (void (*)(int, int, double))0; - int res1; - double val2; - int ecode2 = 0; - void* argp3 = 0; - int res3 = 0; - void* argp4 = 0; - int res4 = 0; - double val5; - int ecode5 = 0; - int res6; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("gridDynSimulationJacobian", args.length(), 7, 7, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "gridDynSimulationJacobian" - "', argument " - "1" - " of type '" - "GridDynSimulation" - "'"); - } - ecode2 = SWIG_AsVal_double(args(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "gridDynSimulationJacobian" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - res3 = SWIG_ConvertPtr(args(2), &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "gridDynSimulationJacobian" - "', argument " - "3" - " of type '" - "double const *" - "'"); - } - arg3 = reinterpret_cast(argp3); - res4 = SWIG_ConvertPtr(args(3), &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "gridDynSimulationJacobian" - "', argument " - "4" - " of type '" - "double const *" - "'"); - } - arg4 = reinterpret_cast(argp4); - ecode5 = SWIG_AsVal_double(args(4), &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), - "in method '" - "gridDynSimulationJacobian" - "', argument " - "5" - " of type '" - "double" - "'"); - } - arg5 = static_cast(val5); - res6 = SWIG_ConvertPtr(args(5), SWIG_as_voidptrptr(&arg6), 0, 0); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), - "in method '" - "gridDynSimulationJacobian" - "', argument " - "6" - " of type '" - "SolverKey" - "'"); - } - { - int res = - SWIG_ConvertFunctionPtr(args(6), (void**)(&arg7), SWIGTYPE_p_f_int_int_double__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), - "in method '" - "gridDynSimulationJacobian" - "', argument " - "7" - " of type '" - "void (*)(int,int,double)" - "'"); - } - } - result = (griddyn_status)gridDynSimulationJacobian( - arg1, arg2, (double const*)arg3, (double const*)arg4, arg5, arg6, arg7); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynSingleQueryCreate, _wrap_GridDynSingleQuery_create, std::string()) -{ - GridDynObject arg1 = (GridDynObject)0; - char* arg2 = (char*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - GridDynSingleQuery result; - - if (!SWIG_check_num_args("GridDynSingleQueryCreate", args.length(), 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynSingleQueryCreate" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynSingleQueryCreate" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - result = (GridDynSingleQuery)GridDynSingleQueryCreate(arg1, (char const*)arg2); - _outv = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynVectorQueryCreate, _wrap_GridDynVectorQuery_create, std::string()) -{ - GridDynObject arg1 = (GridDynObject)0; - char* arg2 = (char*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - GridDynVectorQuery result; - - if (!SWIG_check_num_args("GridDynVectorQueryCreate", args.length(), 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynVectorQueryCreate" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynVectorQueryCreate" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - result = (GridDynVectorQuery)GridDynVectorQueryCreate(arg1, (char const*)arg2); - _outv = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynSingleQueryFree, _wrap_GridDynSingleQuery_free, std::string()) -{ - GridDynSingleQuery arg1 = (GridDynSingleQuery)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - - if (!SWIG_check_num_args("GridDynSingleQueryFree", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynSingleQueryFree" - "', argument " - "1" - " of type '" - "GridDynSingleQuery" - "'"); - } - GridDynSingleQueryFree(arg1); - _outv = octave_value(); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynVectorQueryFree, _wrap_GridDynVectorQuery_free, std::string()) -{ - GridDynVectorQuery arg1 = (GridDynVectorQuery)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - - if (!SWIG_check_num_args("GridDynVectorQueryFree", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynVectorQueryFree" - "', argument " - "1" - " of type '" - "GridDynVectorQuery" - "'"); - } - GridDynVectorQueryFree(arg1); - _outv = octave_value(); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynSingleQueryRun, _wrap_GridDynSingleQuery_run, std::string()) -{ - GridDynSingleQuery arg1 = (GridDynSingleQuery)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - double result; - - if (!SWIG_check_num_args("GridDynSingleQueryRun", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynSingleQueryRun" - "', argument " - "1" - " of type '" - "GridDynSingleQuery" - "'"); - } - result = (double)GridDynSingleQueryRun(arg1); - _outv = SWIG_From_double(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynVectorQueryRun, _wrap_GridDynVectorQuery_run, std::string()) -{ - GridDynVectorQuery arg1 = (GridDynVectorQuery)0; - double* arg2 = (double*)0; - int arg3; - int res1; - void* argp2 = 0; - int res2 = 0; - int val3; - int ecode3 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynVectorQueryRun", args.length(), 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynVectorQueryRun" - "', argument " - "1" - " of type '" - "GridDynVectorQuery" - "'"); - } - res2 = SWIG_ConvertPtr(args(1), &argp2, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynVectorQueryRun" - "', argument " - "2" - " of type '" - "double *" - "'"); - } - arg2 = reinterpret_cast(argp2); - ecode3 = SWIG_AsVal_int(args(2), &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynVectorQueryRun" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - result = (griddyn_status)GridDynVectorQueryRun(arg1, arg2, arg3); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynVectorQueryAppend, _wrap_GridDynVectorQuery_append, std::string()) -{ - GridDynVectorQuery arg1 = (GridDynVectorQuery)0; - GridDynObject arg2 = (GridDynObject)0; - char* arg3 = (char*)0; - int res1; - int res2; - int res3; - char* buf3 = 0; - int alloc3 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynVectorQueryAppend", args.length(), 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynVectorQueryAppend" - "', argument " - "1" - " of type '" - "GridDynVectorQuery" - "'"); - } - res2 = SWIG_ConvertPtr(args(1), SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynVectorQueryAppend" - "', argument " - "2" - " of type '" - "GridDynObject" - "'"); - } - res3 = SWIG_AsCharPtrAndSize(args(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynVectorQueryAppend" - "', argument " - "3" - " of type '" - "char const *" - "'"); - } - arg3 = reinterpret_cast(buf3); - result = (griddyn_status)GridDynVectorQueryAppend(arg1, arg2, (char const*)arg3); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return _out; -fail: - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynSingleQueryUpdate, _wrap_GridDynSingleQuery_update, std::string()) -{ - GridDynSingleQuery arg1 = (GridDynSingleQuery)0; - GridDynObject arg2 = (GridDynObject)0; - char* arg3 = (char*)0; - int res1; - int res2; - int res3; - char* buf3 = 0; - int alloc3 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynSingleQueryUpdate", args.length(), 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynSingleQueryUpdate" - "', argument " - "1" - " of type '" - "GridDynSingleQuery" - "'"); - } - res2 = SWIG_ConvertPtr(args(1), SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynSingleQueryUpdate" - "', argument " - "2" - " of type '" - "GridDynObject" - "'"); - } - res3 = SWIG_AsCharPtrAndSize(args(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynSingleQueryUpdate" - "', argument " - "3" - " of type '" - "char const *" - "'"); - } - arg3 = reinterpret_cast(buf3); - result = (griddyn_status)GridDynSingleQueryUpdate(arg1, arg2, (char const*)arg3); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return _out; -fail: - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynVectorQueryUpdate, _wrap_GridDynVectorQuery_update, std::string()) -{ - GridDynVectorQuery arg1 = (GridDynVectorQuery)0; - GridDynObject arg2 = (GridDynObject)0; - char* arg3 = (char*)0; - int res1; - int res2; - int res3; - char* buf3 = 0; - int alloc3 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynVectorQueryUpdate", args.length(), 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynVectorQueryUpdate" - "', argument " - "1" - " of type '" - "GridDynVectorQuery" - "'"); - } - res2 = SWIG_ConvertPtr(args(1), SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynVectorQueryUpdate" - "', argument " - "2" - " of type '" - "GridDynObject" - "'"); - } - res3 = SWIG_AsCharPtrAndSize(args(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynVectorQueryUpdate" - "', argument " - "3" - " of type '" - "char const *" - "'"); - } - arg3 = reinterpret_cast(buf3); - result = (griddyn_status)GridDynVectorQueryUpdate(arg1, arg2, (char const*)arg3); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return _out; -fail: - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynEventCreate, _wrap_GridDynEvent_create, std::string()) -{ - char* arg1 = (char*)0; - GridDynObject arg2 = (GridDynObject)0; - int res1; - char* buf1 = 0; - int alloc1 = 0; - int res2; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - GridDynEvent result; - - if (!SWIG_check_num_args("GridDynEventCreate", args.length(), 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_AsCharPtrAndSize(args(0), &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynEventCreate" - "', argument " - "1" - " of type '" - "char const *" - "'"); - } - arg1 = reinterpret_cast(buf1); - res2 = SWIG_ConvertPtr(args(1), SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynEventCreate" - "', argument " - "2" - " of type '" - "GridDynObject" - "'"); - } - result = (GridDynEvent)GridDynEventCreate((char const*)arg1, arg2); - _outv = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return _out; -fail: - if (alloc1 == SWIG_NEWOBJ) delete[] buf1; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynEventFree, _wrap_GridDynEvent_free, std::string()) -{ - GridDynEvent arg1 = (GridDynEvent)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - - if (!SWIG_check_num_args("GridDynEventFree", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynEventFree" - "', argument " - "1" - " of type '" - "GridDynEvent" - "'"); - } - GridDynEventFree(arg1); - _outv = octave_value(); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynEventTrigger, _wrap_GridDynEvent_trigger, std::string()) -{ - GridDynEvent arg1 = (GridDynEvent)0; - int res1; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynEventTrigger", args.length(), 1, 1, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynEventTrigger" - "', argument " - "1" - " of type '" - "GridDynEvent" - "'"); - } - result = (griddyn_status)GridDynEventTrigger(arg1); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynEventSchedule, _wrap_GridDynEvent_schedule, std::string()) -{ - GridDynEvent arg1 = (GridDynEvent)0; - GridDynSimulation arg2 = (GridDynSimulation)0; - int res1; - int res2; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynEventSchedule", args.length(), 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynEventSchedule" - "', argument " - "1" - " of type '" - "GridDynEvent" - "'"); - } - res2 = SWIG_ConvertPtr(args(1), SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynEventSchedule" - "', argument " - "2" - " of type '" - "GridDynSimulation" - "'"); - } - result = (griddyn_status)GridDynEventSchedule(arg1, arg2); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynEventSetValue, _wrap_GridDynEvent_setValue, std::string()) -{ - GridDynEvent arg1 = (GridDynEvent)0; - char* arg2 = (char*)0; - double arg3; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - double val3; - int ecode3 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynEventSetValue", args.length(), 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynEventSetValue" - "', argument " - "1" - " of type '" - "GridDynEvent" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynEventSetValue" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - ecode3 = SWIG_AsVal_double(args(2), &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynEventSetValue" - "', argument " - "3" - " of type '" - "double" - "'"); - } - arg3 = static_cast(val3); - result = (griddyn_status)GridDynEventSetValue(arg1, (char const*)arg2, arg3); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynEventSetString, _wrap_GridDynEvent_setString, std::string()) -{ - GridDynEvent arg1 = (GridDynEvent)0; - char* arg2 = (char*)0; - char* arg3 = (char*)0; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - int res3; - char* buf3 = 0; - int alloc3 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynEventSetString", args.length(), 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynEventSetString" - "', argument " - "1" - " of type '" - "GridDynEvent" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynEventSetString" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - res3 = SWIG_AsCharPtrAndSize(args(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynEventSetString" - "', argument " - "3" - " of type '" - "char const *" - "'"); - } - arg3 = reinterpret_cast(buf3); - result = (griddyn_status)GridDynEventSetString(arg1, (char const*)arg2, (char const*)arg3); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - if (alloc3 == SWIG_NEWOBJ) delete[] buf3; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynEventSetFlag, _wrap_GridDynEvent_setFlag, std::string()) -{ - GridDynEvent arg1 = (GridDynEvent)0; - char* arg2 = (char*)0; - int arg3; - int res1; - int res2; - char* buf2 = 0; - int alloc2 = 0; - int val3; - int ecode3 = 0; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynEventSetFlag", args.length(), 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynEventSetFlag" - "', argument " - "1" - " of type '" - "GridDynEvent" - "'"); - } - res2 = SWIG_AsCharPtrAndSize(args(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynEventSetFlag" - "', argument " - "2" - " of type '" - "char const *" - "'"); - } - arg2 = reinterpret_cast(buf2); - ecode3 = SWIG_AsVal_int(args(2), &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynEventSetFlag" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - result = (griddyn_status)GridDynEventSetFlag(arg1, (char const*)arg2, arg3); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return _out; -fail: - if (alloc2 == SWIG_NEWOBJ) delete[] buf2; - return octave_value_list(); -} - -SWIG_DEFUN(GridDynEventSetTarget, _wrap_GridDynEvent_setTarget, std::string()) -{ - GridDynEvent arg1 = (GridDynEvent)0; - GridDynObject arg2 = (GridDynObject)0; - int res1; - int res2; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynEventSetTarget", args.length(), 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynEventSetTarget" - "', argument " - "1" - " of type '" - "GridDynEvent" - "'"); - } - res2 = SWIG_ConvertPtr(args(1), SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynEventSetTarget" - "', argument " - "2" - " of type '" - "GridDynObject" - "'"); - } - result = (griddyn_status)GridDynEventSetTarget(arg1, arg2); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectStateSize, _wrap_GridDynObject_stateSize, std::string()) -{ - GridDynObject arg1 = (GridDynObject)0; - SolverKey arg2 = (SolverKey)0; - int res1; - int res2; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectStateSize", args.length(), 2, 2, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectStateSize" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_ConvertPtr(args(1), SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectStateSize" - "', argument " - "2" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status)GridDynObjectStateSize(arg1, arg2); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectGuessState, _wrap_GridDynObject_guessState, std::string()) -{ - GridDynObject arg1 = (GridDynObject)0; - double arg2; - double* arg3 = (double*)0; - double* arg4 = (double*)0; - SolverKey arg5 = (SolverKey)0; - int res1; - double val2; - int ecode2 = 0; - void* argp3 = 0; - int res3 = 0; - void* argp4 = 0; - int res4 = 0; - int res5; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectGuessState", args.length(), 5, 5, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectGuessState" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - ecode2 = SWIG_AsVal_double(args(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "GridDynObjectGuessState" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - res3 = SWIG_ConvertPtr(args(2), &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynObjectGuessState" - "', argument " - "3" - " of type '" - "double *" - "'"); - } - arg3 = reinterpret_cast(argp3); - res4 = SWIG_ConvertPtr(args(3), &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "GridDynObjectGuessState" - "', argument " - "4" - " of type '" - "double *" - "'"); - } - arg4 = reinterpret_cast(argp4); - res5 = SWIG_ConvertPtr(args(4), SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), - "in method '" - "GridDynObjectGuessState" - "', argument " - "5" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status)GridDynObjectGuessState(arg1, arg2, arg3, arg4, arg5); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectSetState, _wrap_GridDynObject_setState, std::string()) -{ - GridDynObject arg1 = (GridDynObject)0; - double arg2; - double* arg3 = (double*)0; - double* arg4 = (double*)0; - SolverKey arg5 = (SolverKey)0; - int res1; - double val2; - int ecode2 = 0; - void* argp3 = 0; - int res3 = 0; - void* argp4 = 0; - int res4 = 0; - int res5; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectSetState", args.length(), 5, 5, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectSetState" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - ecode2 = SWIG_AsVal_double(args(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), - "in method '" - "GridDynObjectSetState" - "', argument " - "2" - " of type '" - "double" - "'"); - } - arg2 = static_cast(val2); - res3 = SWIG_ConvertPtr(args(2), &argp3, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynObjectSetState" - "', argument " - "3" - " of type '" - "double const *" - "'"); - } - arg3 = reinterpret_cast(argp3); - res4 = SWIG_ConvertPtr(args(3), &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "GridDynObjectSetState" - "', argument " - "4" - " of type '" - "double const *" - "'"); - } - arg4 = reinterpret_cast(argp4); - res5 = SWIG_ConvertPtr(args(4), SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), - "in method '" - "GridDynObjectSetState" - "', argument " - "5" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status) - GridDynObjectSetState(arg1, arg2, (double const*)arg3, (double const*)arg4, arg5); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectGetStateVariableTypes, - _wrap_GridDynObject_getStateVariableTypes, - std::string()) -{ - GridDynObject arg1 = (GridDynObject)0; - double* arg2 = (double*)0; - SolverKey arg3 = (SolverKey)0; - int res1; - void* argp2 = 0; - int res2 = 0; - int res3; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectGetStateVariableTypes", args.length(), 3, 3, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectGetStateVariableTypes" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_ConvertPtr(args(1), &argp2, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectGetStateVariableTypes" - "', argument " - "2" - " of type '" - "double *" - "'"); - } - arg2 = reinterpret_cast(argp2); - res3 = SWIG_ConvertPtr(args(2), SWIG_as_voidptrptr(&arg3), 0, 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" - "GridDynObjectGetStateVariableTypes" - "', argument " - "3" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status)GridDynObjectGetStateVariableTypes(arg1, arg2, arg3); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectResidual, _wrap_GridDynObject_residual, std::string()) -{ - GridDynObject arg1 = (GridDynObject)0; - double* arg2 = (double*)0; - int arg3; - double* arg4 = (double*)0; - SolverKey arg5 = (SolverKey)0; - int res1; - void* argp2 = 0; - int res2 = 0; - int val3; - int ecode3 = 0; - void* argp4 = 0; - int res4 = 0; - int res5; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectResidual", args.length(), 5, 5, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectResidual" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_ConvertPtr(args(1), &argp2, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectResidual" - "', argument " - "2" - " of type '" - "double const *" - "'"); - } - arg2 = reinterpret_cast(argp2); - ecode3 = SWIG_AsVal_int(args(2), &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectResidual" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - res4 = SWIG_ConvertPtr(args(3), &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "GridDynObjectResidual" - "', argument " - "4" - " of type '" - "double *" - "'"); - } - arg4 = reinterpret_cast(argp4); - res5 = SWIG_ConvertPtr(args(4), SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), - "in method '" - "GridDynObjectResidual" - "', argument " - "5" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status)GridDynObjectResidual(arg1, (double const*)arg2, arg3, arg4, arg5); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectDerivative, _wrap_GridDynObject_derivative, std::string()) -{ - GridDynObject arg1 = (GridDynObject)0; - double* arg2 = (double*)0; - int arg3; - double* arg4 = (double*)0; - SolverKey arg5 = (SolverKey)0; - int res1; - void* argp2 = 0; - int res2 = 0; - int val3; - int ecode3 = 0; - void* argp4 = 0; - int res4 = 0; - int res5; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectDerivative", args.length(), 5, 5, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectDerivative" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_ConvertPtr(args(1), &argp2, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectDerivative" - "', argument " - "2" - " of type '" - "double const *" - "'"); - } - arg2 = reinterpret_cast(argp2); - ecode3 = SWIG_AsVal_int(args(2), &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectDerivative" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - res4 = SWIG_ConvertPtr(args(3), &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "GridDynObjectDerivative" - "', argument " - "4" - " of type '" - "double *" - "'"); - } - arg4 = reinterpret_cast(argp4); - res5 = SWIG_ConvertPtr(args(4), SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), - "in method '" - "GridDynObjectDerivative" - "', argument " - "5" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status)GridDynObjectDerivative(arg1, (double const*)arg2, arg3, arg4, arg5); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectAlgebraicUpdate, _wrap_GridDynObject_algebraicUpdate, std::string()) -{ - GridDynObject arg1 = (GridDynObject)0; - double* arg2 = (double*)0; - int arg3; - double* arg4 = (double*)0; - double arg5; - SolverKey arg6 = (SolverKey)0; - int res1; - void* argp2 = 0; - int res2 = 0; - int val3; - int ecode3 = 0; - void* argp4 = 0; - int res4 = 0; - double val5; - int ecode5 = 0; - int res6; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectAlgebraicUpdate", args.length(), 6, 6, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectAlgebraicUpdate" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_ConvertPtr(args(1), &argp2, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectAlgebraicUpdate" - "', argument " - "2" - " of type '" - "double const *" - "'"); - } - arg2 = reinterpret_cast(argp2); - ecode3 = SWIG_AsVal_int(args(2), &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectAlgebraicUpdate" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - res4 = SWIG_ConvertPtr(args(3), &argp4, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), - "in method '" - "GridDynObjectAlgebraicUpdate" - "', argument " - "4" - " of type '" - "double *" - "'"); - } - arg4 = reinterpret_cast(argp4); - ecode5 = SWIG_AsVal_double(args(4), &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), - "in method '" - "GridDynObjectAlgebraicUpdate" - "', argument " - "5" - " of type '" - "double" - "'"); - } - arg5 = static_cast(val5); - res6 = SWIG_ConvertPtr(args(5), SWIG_as_voidptrptr(&arg6), 0, 0); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), - "in method '" - "GridDynObjectAlgebraicUpdate" - "', argument " - "6" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status) - GridDynObjectAlgebraicUpdate(arg1, (double const*)arg2, arg3, arg4, arg5, arg6); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectJacobian, _wrap_GridDynObject_jacobian, std::string()) -{ - GridDynObject arg1 = (GridDynObject)0; - double* arg2 = (double*)0; - int arg3; - double arg4; - void (*arg5)(int, int, double) = (void (*)(int, int, double))0; - SolverKey arg6 = (SolverKey)0; - int res1; - void* argp2 = 0; - int res2 = 0; - int val3; - int ecode3 = 0; - double val4; - int ecode4 = 0; - int res6; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectJacobian", args.length(), 6, 6, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectJacobian" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_ConvertPtr(args(1), &argp2, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectJacobian" - "', argument " - "2" - " of type '" - "double const *" - "'"); - } - arg2 = reinterpret_cast(argp2); - ecode3 = SWIG_AsVal_int(args(2), &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectJacobian" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - ecode4 = SWIG_AsVal_double(args(3), &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), - "in method '" - "GridDynObjectJacobian" - "', argument " - "4" - " of type '" - "double" - "'"); - } - arg4 = static_cast(val4); - { - int res = - SWIG_ConvertFunctionPtr(args(4), (void**)(&arg5), SWIGTYPE_p_f_int_int_double__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), - "in method '" - "GridDynObjectJacobian" - "', argument " - "5" - " of type '" - "void (*)(int,int,double)" - "'"); - } - } - res6 = SWIG_ConvertPtr(args(5), SWIG_as_voidptrptr(&arg6), 0, 0); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), - "in method '" - "GridDynObjectJacobian" - "', argument " - "6" - " of type '" - "SolverKey" - "'"); - } - result = - (griddyn_status)GridDynObjectJacobian(arg1, (double const*)arg2, arg3, arg4, arg5, arg6); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectIoPartialDerivatives, - _wrap_GridDynObject_ioPartialDerivatives, - std::string()) -{ - GridDynObject arg1 = (GridDynObject)0; - double* arg2 = (double*)0; - int arg3; - void (*arg4)(int, int, double) = (void (*)(int, int, double))0; - SolverKey arg5 = (SolverKey)0; - int res1; - void* argp2 = 0; - int res2 = 0; - int val3; - int ecode3 = 0; - int res5; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectIoPartialDerivatives", args.length(), 5, 5, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectIoPartialDerivatives" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_ConvertPtr(args(1), &argp2, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectIoPartialDerivatives" - "', argument " - "2" - " of type '" - "double const *" - "'"); - } - arg2 = reinterpret_cast(argp2); - ecode3 = SWIG_AsVal_int(args(2), &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectIoPartialDerivatives" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - { - int res = - SWIG_ConvertFunctionPtr(args(3), (void**)(&arg4), SWIGTYPE_p_f_int_int_double__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), - "in method '" - "GridDynObjectIoPartialDerivatives" - "', argument " - "4" - " of type '" - "void (*)(int,int,double)" - "'"); - } - } - res5 = SWIG_ConvertPtr(args(4), SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), - "in method '" - "GridDynObjectIoPartialDerivatives" - "', argument " - "5" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status) - GridDynObjectIoPartialDerivatives(arg1, (double const*)arg2, arg3, arg4, arg5); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -SWIG_DEFUN(GridDynObjectOutputPartialDerivatives, - _wrap_GridDynObject_outputPartialDerivatives, - std::string()) -{ - GridDynObject arg1 = (GridDynObject)0; - double* arg2 = (double*)0; - int arg3; - void (*arg4)(int, int, double) = (void (*)(int, int, double))0; - SolverKey arg5 = (SolverKey)0; - int res1; - void* argp2 = 0; - int res2 = 0; - int val3; - int ecode3 = 0; - int res5; - octave_value_list _out; - octave_value_list* _outp = &_out; - octave_value _outv; - griddyn_status result; - - if (!SWIG_check_num_args("GridDynObjectOutputPartialDerivatives", args.length(), 5, 5, 0)) { - SWIG_fail; - } - res1 = SWIG_ConvertPtr(args(0), SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" - "GridDynObjectOutputPartialDerivatives" - "', argument " - "1" - " of type '" - "GridDynObject" - "'"); - } - res2 = SWIG_ConvertPtr(args(1), &argp2, SWIGTYPE_p_double, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" - "GridDynObjectOutputPartialDerivatives" - "', argument " - "2" - " of type '" - "double const *" - "'"); - } - arg2 = reinterpret_cast(argp2); - ecode3 = SWIG_AsVal_int(args(2), &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), - "in method '" - "GridDynObjectOutputPartialDerivatives" - "', argument " - "3" - " of type '" - "int" - "'"); - } - arg3 = static_cast(val3); - { - int res = - SWIG_ConvertFunctionPtr(args(3), (void**)(&arg4), SWIGTYPE_p_f_int_int_double__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), - "in method '" - "GridDynObjectOutputPartialDerivatives" - "', argument " - "4" - " of type '" - "void (*)(int,int,double)" - "'"); - } - } - res5 = SWIG_ConvertPtr(args(4), SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), - "in method '" - "GridDynObjectOutputPartialDerivatives" - "', argument " - "5" - " of type '" - "SolverKey" - "'"); - } - result = (griddyn_status) - GridDynObjectOutputPartialDerivatives(arg1, (double const*)arg2, arg3, arg4, arg5); - _outv = SWIG_From_int(static_cast(result)); - if (_outv.is_defined()) _outp = SWIG_Octave_AppendOutput(_outp, _outv); - return _out; -fail: - return octave_value_list(); -} - -static const struct swig_octave_member swig_globals[] = { - {"new_doublep", _wrap_new_doublep, 0, 0, 2, 0}, - {"copy_doublep", _wrap_copy_doublep, 0, 0, 2, 0}, - {"delete_doublep", _wrap_delete_doublep, 0, 0, 2, 0}, - {"doublep_assign", _wrap_doublep_assign, 0, 0, 2, 0}, - {"doublep_value", _wrap_doublep_value, 0, 0, 2, 0}, - {"new_charp", _wrap_new_charp, 0, 0, 2, 0}, - {"copy_charp", _wrap_copy_charp, 0, 0, 2, 0}, - {"delete_charp", _wrap_delete_charp, 0, 0, 2, 0}, - {"charp_assign", _wrap_charp_assign, 0, 0, 2, 0}, - {"charp_value", _wrap_charp_value, 0, 0, 2, 0}, - {"new_doubleArray", _wrap_new_doubleArray, 0, 0, 2, 0}, - {"delete_doubleArray", _wrap_delete_doubleArray, 0, 0, 2, 0}, - {"doubleArray___paren__", _wrap_doubleArray___paren__, 0, 0, 2, 0}, - {"doubleArray___paren_asgn__", _wrap_doubleArray___paren_asgn__, 0, 0, 2, 0}, - {"doubleArray_cast", _wrap_doubleArray_cast, 0, 0, 2, 0}, - {"doubleArray_frompointer", _wrap_doubleArray_frompointer, 0, 0, 2, 0}, - {"GridDynObjectCreate", _wrap_GridDynObject_create, 0, 0, 2, 0}, - {"GridDynObjectClone", _wrap_GridDynObject_clone, 0, 0, 2, 0}, - {"GridDynObjectFree", _wrap_GridDynObject_free, 0, 0, 2, 0}, - {"GridDynObjectAdd", _wrap_GridDynObject_add, 0, 0, 2, 0}, - {"GridDynObjectRemove", _wrap_GridDynObject_remove, 0, 0, 2, 0}, - {"GridDynObjectSetString", _wrap_GridDynObject_setString, 0, 0, 2, 0}, - {"GridDynObjectSetValue", _wrap_GridDynObject_setValue, 0, 0, 2, 0}, - {"GridDynObjectSetValueUnits", _wrap_GridDynObject_setValueUnits, 0, 0, 2, 0}, - {"GridDynObjectSetFlag", _wrap_GridDynObject_setFlag, 0, 0, 2, 0}, - {"GridDynObjectGetString", _wrap_GridDynObject_getString, 0, 0, 2, 0}, - {"GridDynObjectGetValue", _wrap_GridDynObject_getValue, 0, 0, 2, 0}, - {"GridDynObjectGetValueUnits", _wrap_GridDynObject_getValueUnits, 0, 0, 2, 0}, - {"GridDynObjectGetFlag", _wrap_GridDynObject_getFlag, 0, 0, 2, 0}, - {"GridDynObjectFind", _wrap_GridDynObject_find, 0, 0, 2, 0}, - {"GridDynObjectGetSubObject", _wrap_GridDynObject_getSubObject, 0, 0, 2, 0}, - {"GridDynObjectFindByUserId", _wrap_GridDynObject_findByUserId, 0, 0, 2, 0}, - {"GridDynObjectGetParent", _wrap_GridDynObject_getParent, 0, 0, 2, 0}, - {"GridDynObjectGetType", _wrap_GridDynObject_getType, 0, 0, 2, 0}, - {"gridDynSimulationCreate", _wrap_gridDynSimulationCreate, 0, 0, 2, 0}, - {"gridDynSimulationFree", _wrap_gridDynSimulationFree, 0, 0, 2, 0}, - {"gridDynSimulationInitializeFromString", - _wrap_gridDynSimulationInitializeFromString, - 0, - 0, - 2, - 0}, - {"gridDynSimulationInitializeFromArgs", _wrap_gridDynSimulationInitializeFromArgs, 0, 0, 2, 0}, - {"gridDynSimulationLoadfile", _wrap_gridDynSimulationLoadfile, 0, 0, 2, 0}, - {"gridDynSimulationAddCommand", _wrap_gridDynSimulationAddCommand, 0, 0, 2, 0}, - {"gridDynSimulationPowerflowInitialize", - _wrap_gridDynSimulationPowerflowInitialize, - 0, - 0, - 2, - 0}, - {"gridDynSimulationPowerflow", _wrap_gridDynSimulationPowerflow, 0, 0, 2, 0}, - {"gridDynSimulationDynamicInitialize", _wrap_gridDynSimulationDynamicInitialize, 0, 0, 2, 0}, - {"gridDynSimulationReset", _wrap_gridDynSimulationReset, 0, 0, 2, 0}, - {"gridDynSimulationGetCurrentTime", _wrap_gridDynSimulationGetCurrentTime, 0, 0, 2, 0}, - {"gridDynSimulationRun", _wrap_gridDynSimulationRun, 0, 0, 2, 0}, - {"gridDynSimulationRunTo", _wrap_gridDynSimulationRunTo, 0, 0, 2, 0}, - {"gridDynSimulationStep", _wrap_gridDynSimulationStep, 0, 0, 2, 0}, - {"gridDynSimulationRunAsync", _wrap_gridDynSimulationRunAsync, 0, 0, 2, 0}, - {"gridDynSimulationRunToAsync", _wrap_gridDynSimulationRunToAsync, 0, 0, 2, 0}, - {"gridDynSimulationStepAsync", _wrap_gridDynSimulationStepAsync, 0, 0, 2, 0}, - {"gridDynSimulationGetStatus", _wrap_gridDynSimulationGetStatus, 0, 0, 2, 0}, - {"getSimulationObject", _wrap_getSimulationObject, 0, 0, 2, 0}, - {"gridDynSimulationGetSolverKey", _wrap_gridDynSimulationGetSolverKey, 0, 0, 2, 0}, - {"gridDynSolverKeyFree", _wrap_gridDynSolverKeyFree, 0, 0, 2, 0}, - {"gridDynSimulationStateSize", _wrap_gridDynSimulationStateSize, 0, 0, 2, 0}, - {"gridDynSimulationBusCount", _wrap_gridDynSimulationBusCount, 0, 0, 2, 0}, - {"gridDynSimulationLineCount", _wrap_gridDynSimulationLineCount, 0, 0, 2, 0}, - {"gridDynSimulationGetResults", _wrap_gridDynSimulationGetResults, 0, 0, 2, 0}, - {"gridDynSimulationGuessState", _wrap_gridDynSimulationGuessState, 0, 0, 2, 0}, - {"gridDynSimulationSetState", _wrap_gridDynSimulationSetState, 0, 0, 2, 0}, - {"gridDynSimulationGetStateVariableTypes", - _wrap_gridDynSimulationGetStateVariableTypes, - 0, - 0, - 2, - 0}, - {"gridDynSimulationResidual", _wrap_gridDynSimulationResidual, 0, 0, 2, 0}, - {"gridDynSimulationDerivative", _wrap_gridDynSimulationDerivative, 0, 0, 2, 0}, - {"gridDynSimulationAlgebraicUpdate", _wrap_gridDynSimulationAlgebraicUpdate, 0, 0, 2, 0}, - {"gridDynSimulationJacobian", _wrap_gridDynSimulationJacobian, 0, 0, 2, 0}, - {"GridDynSingleQueryCreate", _wrap_GridDynSingleQuery_create, 0, 0, 2, 0}, - {"GridDynVectorQueryCreate", _wrap_GridDynVectorQuery_create, 0, 0, 2, 0}, - {"GridDynSingleQueryFree", _wrap_GridDynSingleQuery_free, 0, 0, 2, 0}, - {"GridDynVectorQueryFree", _wrap_GridDynVectorQuery_free, 0, 0, 2, 0}, - {"GridDynSingleQueryRun", _wrap_GridDynSingleQuery_run, 0, 0, 2, 0}, - {"GridDynVectorQueryRun", _wrap_GridDynVectorQuery_run, 0, 0, 2, 0}, - {"GridDynVectorQueryAppend", _wrap_GridDynVectorQuery_append, 0, 0, 2, 0}, - {"GridDynSingleQueryUpdate", _wrap_GridDynSingleQuery_update, 0, 0, 2, 0}, - {"GridDynVectorQueryUpdate", _wrap_GridDynVectorQuery_update, 0, 0, 2, 0}, - {"GridDynEventCreate", _wrap_GridDynEvent_create, 0, 0, 2, 0}, - {"GridDynEventFree", _wrap_GridDynEvent_free, 0, 0, 2, 0}, - {"GridDynEventTrigger", _wrap_GridDynEvent_trigger, 0, 0, 2, 0}, - {"GridDynEventSchedule", _wrap_GridDynEvent_schedule, 0, 0, 2, 0}, - {"GridDynEventSetValue", _wrap_GridDynEvent_setValue, 0, 0, 2, 0}, - {"GridDynEventSetString", _wrap_GridDynEvent_setString, 0, 0, 2, 0}, - {"GridDynEventSetFlag", _wrap_GridDynEvent_setFlag, 0, 0, 2, 0}, - {"GridDynEventSetTarget", _wrap_GridDynEvent_setTarget, 0, 0, 2, 0}, - {"GridDynObjectStateSize", _wrap_GridDynObject_stateSize, 0, 0, 2, 0}, - {"GridDynObjectGuessState", _wrap_GridDynObject_guessState, 0, 0, 2, 0}, - {"GridDynObjectSetState", _wrap_GridDynObject_setState, 0, 0, 2, 0}, - {"GridDynObjectGetStateVariableTypes", _wrap_GridDynObject_getStateVariableTypes, 0, 0, 2, 0}, - {"GridDynObjectResidual", _wrap_GridDynObject_residual, 0, 0, 2, 0}, - {"GridDynObjectDerivative", _wrap_GridDynObject_derivative, 0, 0, 2, 0}, - {"GridDynObjectAlgebraicUpdate", _wrap_GridDynObject_algebraicUpdate, 0, 0, 2, 0}, - {"GridDynObjectJacobian", _wrap_GridDynObject_jacobian, 0, 0, 2, 0}, - {"GridDynObjectIoPartialDerivatives", _wrap_GridDynObject_ioPartialDerivatives, 0, 0, 2, 0}, - {"GridDynObjectOutputPartialDerivatives", - _wrap_GridDynObject_outputPartialDerivatives, - 0, - 0, - 2, - 0}, - {0, 0, 0, 0, 0, 0}}; - -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ - -static void* _p_doubleArrayTo_p_double(void* x, int* SWIGUNUSEDPARM(newmemory)) -{ - return (void*)((double*)((doubleArray*)x)); -} -static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_doubleArray = - {"_p_doubleArray", "doubleArray *", 0, 0, (void*)&_wrap_class_doubleArray, 0}; -static swig_type_info _swigt__p_f_int_int_double__void = - {"_p_f_int_int_double__void", "void (*)(int,int,double)", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_griddyn_status_enum = { - "_p_griddyn_status_enum", - "enum griddyn_status_enum *|griddyn_status_enum *", - 0, - 0, - (void*)0, - 0}; -static swig_type_info _swigt__p_int = {"_p_int", "int *|griddyn_status *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_void = { - "_p_void", - "GridDynObject|GridDynVectorQuery|GridDynSimulation|GridDynEvent|void *|SolverKey|GridDynSingleQuery", - 0, - 0, - (void*)0, - 0}; - -static swig_type_info* swig_type_initial[] = { - &_swigt__p_char, - &_swigt__p_double, - &_swigt__p_doubleArray, - &_swigt__p_f_int_int_double__void, - &_swigt__p_griddyn_status_enum, - &_swigt__p_int, - &_swigt__p_p_char, - &_swigt__p_void, -}; - -static swig_cast_info _swigc__p_char[] = {{&_swigt__p_char, 0, 0, 0}, {0, 0, 0, 0}}; -static swig_cast_info _swigc__p_double[] = { - {&_swigt__p_doubleArray, _p_doubleArrayTo_p_double, 0, 0}, - {&_swigt__p_double, 0, 0, 0}, - {0, 0, 0, 0}}; -static swig_cast_info _swigc__p_doubleArray[] = {{&_swigt__p_doubleArray, 0, 0, 0}, {0, 0, 0, 0}}; -static swig_cast_info _swigc__p_f_int_int_double__void[] = - {{&_swigt__p_f_int_int_double__void, 0, 0, 0}, {0, 0, 0, 0}}; -static swig_cast_info _swigc__p_griddyn_status_enum[] = {{&_swigt__p_griddyn_status_enum, 0, 0, 0}, - {0, 0, 0, 0}}; -static swig_cast_info _swigc__p_int[] = {{&_swigt__p_int, 0, 0, 0}, {0, 0, 0, 0}}; -static swig_cast_info _swigc__p_p_char[] = {{&_swigt__p_p_char, 0, 0, 0}, {0, 0, 0, 0}}; -static swig_cast_info _swigc__p_void[] = {{&_swigt__p_void, 0, 0, 0}, {0, 0, 0, 0}}; - -static swig_cast_info* swig_cast_initial[] = { - _swigc__p_char, - _swigc__p_double, - _swigc__p_doubleArray, - _swigc__p_f_int_int_double__void, - _swigc__p_griddyn_status_enum, - _swigc__p_int, - _swigc__p_p_char, - _swigc__p_void, -}; - -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ - -/* ----------------------------------------------------------------------------- - * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to - * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of - * swig_module, and does all the lookup, filling in the swig_module.types - * array with the correct data and linking the correct swig_cast_info - * structures together. - * - * The generated swig_type_info structures are assigned statically to an initial - * array. We just loop through that array, and handle each type individually. - * First we lookup if this type has been already loaded, and if so, use the - * loaded structure instead of the generated one. Then we have to fill in the - * cast linked list. The cast data is initially stored in something like a - * two-dimensional array. Each row corresponds to a type (there are the same - * number of rows as there are in the swig_type_initial array). Each entry in - * a column is one of the swig_cast_info structures for that type. - * The cast_initial array is actually an array of arrays, because each row has - * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it - * adding the casts to the list. The one last trick we need to do is making - * sure the type pointer in the swig_cast_info struct is correct. - * - * First off, we lookup the cast->type name to see if it is already loaded. - * There are three cases to handle: - * 1) If the cast->type has already been loaded AND the type we are adding - * casting info to has not been loaded (it is in this module), THEN we - * replace the cast->type pointer with the type pointer that has already - * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the - * cast->type) are loaded, THEN the cast info has already been loaded by - * the previous module so we just ignore it. - * 3) Finally, if cast->type has not already been loaded, then we add that - * swig_cast_info to the linked list (because the cast->type) pointer will - * be correct. - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus -extern "C" { -# if 0 -} /* c-mode */ -# endif -#endif - -#if 0 -# define SWIGRUNTIME_DEBUG -#endif - -SWIGRUNTIME void SWIG_InitializeModule(void* clientdata) -{ - size_t i; - swig_module_info *module_head, *iter; - int init; - - /* check to see if the circular list has been setup, if not, set it up */ - if (swig_module.next == 0) { - /* Initialize the swig_module */ - swig_module.type_initial = swig_type_initial; - swig_module.cast_initial = swig_cast_initial; - swig_module.next = &swig_module; - init = 1; - } else { - init = 0; - } - - /* Try and load any already created modules */ - module_head = SWIG_GetModule(clientdata); - if (!module_head) { - /* This is the first module loaded for this interpreter */ - /* so set the swig module into the interpreter */ - SWIG_SetModule(clientdata, &swig_module); - } else { - /* the interpreter has loaded a SWIG module, but has it loaded this one? */ - iter = module_head; - do { - if (iter == &swig_module) { - /* Our module is already in the list, so there's nothing more to do. */ - return; - } - iter = iter->next; - } while (iter != module_head); - - /* otherwise we must add our module into the list */ - swig_module.next = module_head->next; - module_head->next = &swig_module; - } - - /* When multiple interpreters are used, a module could have already been initialized in - a different interpreter, but not yet have a pointer in this interpreter. - In this case, we do not want to continue adding types... everything should be - set up already */ - if (init == 0) return; - - /* Now work on filling in swig_module.types */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: size %d\n", swig_module.size); -#endif - for (i = 0; i < swig_module.size; ++i) { - swig_type_info* type = 0; - swig_type_info* ret; - swig_cast_info* cast; - -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); -#endif - - /* if there is another module already loaded */ - if (swig_module.next != &swig_module) { - type = SWIG_MangledTypeQueryModule(swig_module.next, - &swig_module, - swig_module.type_initial[i]->name); - } - if (type) { - /* Overwrite clientdata field */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found type %s\n", type->name); -#endif - if (swig_module.type_initial[i]->clientdata) { - type->clientdata = swig_module.type_initial[i]->clientdata; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); -#endif - } - } else { - type = swig_module.type_initial[i]; - } - - /* Insert casting types */ - cast = swig_module.cast_initial[i]; - while (cast->type) { - /* Don't need to add information already in the list */ - ret = 0; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); -#endif - if (swig_module.next != &swig_module) { - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); -#ifdef SWIGRUNTIME_DEBUG - if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); -#endif - } - if (ret) { - if (type == swig_module.type_initial[i]) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: skip old type %s\n", ret->name); -#endif - cast->type = ret; - ret = 0; - } else { - /* Check for casting already in the list */ - swig_cast_info* ocast = SWIG_TypeCheck(ret->name, type); -#ifdef SWIGRUNTIME_DEBUG - if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); -#endif - if (!ocast) ret = 0; - } - } - - if (!ret) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); -#endif - if (type->cast) { - type->cast->prev = cast; - cast->next = type->cast; - } - type->cast = cast; - } - cast++; - } - /* Set entry in modules->types array equal to the type */ - swig_module.types[i] = type; - } - swig_module.types[i] = 0; - -#ifdef SWIGRUNTIME_DEBUG - printf("**** SWIG_InitializeModule: Cast List ******\n"); - for (i = 0; i < swig_module.size; ++i) { - int j = 0; - swig_cast_info* cast = swig_module.cast_initial[i]; - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); - while (cast->type) { - printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); - cast++; - ++j; - } - printf("---- Total casts: %d\n", j); - } - printf("**** SWIG_InitializeModule: Cast List ******\n"); -#endif -} - -/* This function will propagate the clientdata field of type to - * any new swig_type_info structures that have been added into the list - * of equivalent types. It is like calling - * SWIG_TypeClientData(type, clientdata) a second time. - */ -SWIGRUNTIME void SWIG_PropagateClientData(void) -{ - size_t i; - swig_cast_info* equiv; - static int init_run = 0; - - if (init_run) return; - init_run = 1; - - for (i = 0; i < swig_module.size; i++) { - if (swig_module.types[i]->clientdata) { - equiv = swig_module.types[i]->cast; - while (equiv) { - if (!equiv->converter) { - if (equiv->type && !equiv->type->clientdata) - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); - } - equiv = equiv->next; - } - } - } -} - -#ifdef __cplusplus -# if 0 -{ /* c-mode */ -# endif -} -#endif - -static bool SWIG_init_user(octave_swig_type* module_ns); - -SWIGINTERN bool SWIG_Octave_LoadModule(std::string name) -{ - bool retn = false; - { -#if SWIG_OCTAVE_PREREQ(4, 2, 0) - octave::unwind_protect frame; - frame.protect_var(discard_error_messages); - discard_error_messages = true; - frame.protect_var(discard_warning_messages); - discard_warning_messages = true; -#elif SWIG_OCTAVE_PREREQ(3, 3, 50) - unwind_protect frame; - frame.protect_var(error_state); - error_state = 0; - frame.protect_var(warning_state); - warning_state = 0; - frame.protect_var(discard_error_messages); - discard_error_messages = true; - frame.protect_var(discard_warning_messages); - discard_warning_messages = true; -#else - unwind_protect::begin_frame("SWIG_Octave_LoadModule"); - unwind_protect_int(error_state); - error_state = 0; - unwind_protect_int(warning_state); - warning_state = 0; - unwind_protect_bool(discard_error_messages); - discard_error_messages = true; - unwind_protect_bool(discard_warning_messages); - discard_warning_messages = true; -#endif -#if SWIG_OCTAVE_PREREQ(4, 2, 0) - try { - feval(name, octave_value_list(), 0); - retn = true; - } - catch (octave::execution_exception&) { - } -#else - feval(name, octave_value_list(), 0); - retn = (error_state == 0); -#endif -#if !SWIG_OCTAVE_PREREQ(3, 3, 50) - unwind_protect::run_frame("SWIG_Octave_LoadModule"); -#endif - } - if (!retn) { - error(SWIG_name_d ": could not load module `%s'", name.c_str()); - } - return retn; -} - -SWIGINTERN bool SWIG_Octave_InstallFunction(octave_function* octloadfcn, std::string name) -{ - bool retn = false; - { -#if SWIG_OCTAVE_PREREQ(4, 2, 0) - octave::unwind_protect frame; - frame.protect_var(discard_error_messages); - discard_error_messages = true; - frame.protect_var(discard_warning_messages); - discard_warning_messages = true; -#elif SWIG_OCTAVE_PREREQ(3, 3, 50) - unwind_protect frame; - frame.protect_var(error_state); - error_state = 0; - frame.protect_var(warning_state); - warning_state = 0; - frame.protect_var(discard_error_messages); - discard_error_messages = true; - frame.protect_var(discard_warning_messages); - discard_warning_messages = true; -#else - unwind_protect::begin_frame("SWIG_Octave_LoadModule"); - unwind_protect_int(error_state); - error_state = 0; - unwind_protect_int(warning_state); - warning_state = 0; - unwind_protect_bool(discard_error_messages); - discard_error_messages = true; - unwind_protect_bool(discard_warning_messages); - discard_warning_messages = true; -#endif - octave_value_list args; - args.append(name); - args.append(octloadfcn->fcn_file_name()); -#if SWIG_OCTAVE_PREREQ(4, 2, 0) - try { - feval("autoload", args, 0); - retn = true; - } - catch (octave::execution_exception&) { - } -#else - feval("autoload", args, 0); - retn = (error_state == 0); -#endif -#if !SWIG_OCTAVE_PREREQ(3, 3, 50) - unwind_protect::run_frame("SWIG_Octave_InstallFunction"); -#endif - } - if (!retn) { - error(SWIG_name_d ": could not load function `%s'", name.c_str()); - } - return retn; -} - -static const char* const subclass_usage = "-*- texinfo -*- \n\ -@deftypefn {Loadable Function} {} subclass()\n\ -@deftypefnx{Loadable Function} {} subclass(@var{swigclass}, @var{name}, @var{fcn}, @dots{})\n\ -Subclass a C++ class from within Octave, and provide implementations of its virtual methods.\n\ -\n\ -See the SWIG manual for usage examples.\n\ -@end deftypefn"; - -DEFUN_DLD(subclass, args, nargout, subclass_usage) -{ - octave_swig_type* top = new octave_swig_type; - for (int j = 0; j < args.length(); ++j) { - if (args(j).type_id() == octave_swig_ref::static_type_id()) { - octave_swig_ref* osr = static_cast(args(j).internal_rep()); - octave_swig_type* ost = osr->get_ptr(); - if (!ost->is_owned()) { - error("subclass: cannot subclass object not constructed on octave side"); - return octave_value_list(); - } - top->merge(*ost); - } else if (args(j).is_function_handle()) { - top->assign(args(j).fcn_handle_value()->fcn_name(), args(j)); - } else if (args(j).is_string()) { - if (j + 1 >= args.length()) { - error("subclass: member assignments must be of string,value form"); - return octave_value_list(); - } - top->assign(args(j).string_value(), args(j + 1)); - ++j; - } else { - error("subclass: invalid arguments to subclass()"); - return octave_value_list(); - } - } - return octave_value(Swig::swig_value_ref(top)); -} - -static const char* const swig_type_usage = "-*- texinfo -*- \n\ -@deftypefn {Loadable Function} {} swig_type(@var{swigref})\n\ -Return the underlying C/C++ type name of a SWIG-wrapped object.\n\ -@end deftypefn"; - -DEFUN_DLD(swig_type, args, nargout, swig_type_usage) -{ - if (args.length() != 1) { - error("swig_type: must be called with only a single object"); - return octave_value_list(); - } - octave_swig_type* ost = Swig::swig_value_deref(args(0)); - if (!ost) { - error("swig_type: object is not a swig_ref"); - return octave_value_list(); - } - return octave_value(ost->swig_type_name()); -} - -static const char* const swig_typequery_usage = "-*- texinfo -*- \n\ -@deftypefn {Loadable Function} {} swig_typequery(@var{string})\n\ -Return @var{string} if it is a recognised SWIG-wrapped C/C++ type name;\n\ -otherwise return `'.\n\ -@end deftypefn"; - -DEFUN_DLD(swig_typequery, args, nargout, swig_typequery_usage) -{ - if (args.length() != 1 || !args(0).is_string()) { - error("swig_typequery: must be called with single string argument"); - return octave_value_list(); - } - swig_module_info* module = SWIG_GetModule(0); - swig_type_info* type = SWIG_TypeQueryModule(module, module, args(0).string_value().c_str()); - if (!type) return octave_value(""); - return octave_value(type->name); -} - -static const char* const swig_this_usage = "-*- texinfo -*- \n\ -@deftypefn {Loadable Function} {} swig_this(@var{swigref})\n\ -Return the underlying C/C++ pointer of a SWIG-wrapped object.\n\ -@end deftypefn"; - -DEFUN_DLD(swig_this, args, nargout, swig_this_usage) -{ - if (args.length() != 1) { - error("swig_this: must be called with only a single object"); - return octave_value_list(); - } - if (args(0).is_matrix_type() && args(0).rows() == 0 && args(0).columns() == 0) - return octave_value(octave_uint64(0)); - octave_swig_type* ost = Swig::swig_value_deref(args(0)); - if (!ost) { - error("swig_this: object is not a swig_ref"); - return octave_value_list(); - } - return octave_value(octave_uint64((unsigned long long)ost->swig_this())); -} - -static const char* const swig_octave_prereq_usage = "-*- texinfo -*- \n\ -@deftypefn {Loadable Function} {} swig_octave_prereq(@var{major}, @var{minor}, @var{patch})\n\ -Return true if the version of Octave is at least @var{major}.@var{minor}.@var{patch}.\n\ -@end deftypefn"; - -DEFUN_DLD(swig_octave_prereq, args, nargout, swig_octave_prereq_usage) -{ - if (args.length() != 3) { - error("swig_octave_prereq: must be called with 3 arguments"); - return octave_value_list(); - } - const int major = args(0).int_value(); - const int minor = args(1).int_value(); - const int patch = args(2).int_value(); - const bool prereq = SWIG_OCTAVE_PREREQ(major, minor, patch); - return octave_value(prereq); -} - -static const char* const SWIG_name_usage = "-*- texinfo -*- \n\ -@deftypefn {Loadable Module} {} " SWIG_name_d "\n\ -Loads the SWIG-generated module `" SWIG_name_d "'.\n\ -@end deftypefn"; - -DEFUN_DLD(SWIG_name, args, nargout, SWIG_name_usage) -{ - static octave_swig_type* module_ns = 0; - - // workaround to prevent octave seg-faulting on exit: set Octave exit function - // octave_exit to _Exit, which exits immediately without trying to cleanup memory. - // definitely affected version 3.2.*, not sure about 3.3.*, seems to be fixed in - // version 3.4.*, but reappeared in 4.2.*, so turn on for all versions after 3.2.*. - // can be turned off with macro definition. -#ifndef SWIG_OCTAVE_NO_SEGFAULT_HACK -# if SWIG_OCTAVE_PREREQ(3, 2, 0) - octave_exit = ::_Exit; -# endif -#endif - - // check for no input and output args - if (args.length() != 0 || nargout != 0) { - print_usage(); - return octave_value_list(); - } - - // create module on first function call - if (!module_ns) { - // workaround bug in octave where installing global variable of custom type and then - // exiting without explicitly clearing the variable causes octave to segfault. -#if SWIG_OCTAVE_PREREQ(3, 2, 0) - octave_value_list eval_args; - eval_args.append("base"); - eval_args.append("function __swig_atexit__; " - " if mislocked() " - " clear -all; " - " else " - " mlock(); " - " endif; " - "endfunction; " - "__swig_atexit__; " - "atexit(\"__swig_atexit__\", false); " - "atexit(\"__swig_atexit__\")"); - feval("evalin", eval_args, 0); -#endif - - octave_swig_ref::register_type(); - octave_swig_packed::register_type(); - SWIG_InitializeModule(0); - SWIG_PropagateClientData(); - - octave_function* me = octave_call_stack::current(); - - if (!SWIG_Octave_InstallFunction(me, "subclass")) { - return octave_value_list(); - } - if (!SWIG_Octave_InstallFunction(me, "swig_type")) { - return octave_value_list(); - } - if (!SWIG_Octave_InstallFunction(me, "swig_typequery")) { - return octave_value_list(); - } - if (!SWIG_Octave_InstallFunction(me, "swig_this")) { - return octave_value_list(); - } - if (!SWIG_Octave_InstallFunction(me, "swig_octave_prereq")) { - return octave_value_list(); - } - - octave_swig_type* cvar_ns = 0; - if (std::string(SWIG_global_name) != ".") { - cvar_ns = new octave_swig_type; - for (int j = 0; swig_globals[j].name; ++j) - if (swig_globals[j].get_method) - cvar_ns->assign(swig_globals[j].name, &swig_globals[j]); - } - - module_ns = new octave_swig_type(0, 0, 0, true); - if (std::string(SWIG_global_name) != ".") { - module_ns->assign(SWIG_global_name, Swig::swig_value_ref(cvar_ns)); - } else { - for (int j = 0; swig_globals[j].name; ++j) - if (swig_globals[j].get_method) - module_ns->assign(swig_globals[j].name, &swig_globals[j]); - } - for (int j = 0; swig_globals[j].name; ++j) - if (swig_globals[j].method) module_ns->assign(swig_globals[j].name, &swig_globals[j]); - - // * need better solution here; swig_type -> octave_class mapping is - // * really n-to-1, in some cases such as template partial spec, etc. - // * see failing tests. - for (int j = 0; swig_types[j]; ++j) - if (swig_types[j]->clientdata) { - swig_octave_class* c = (swig_octave_class*)swig_types[j]->clientdata; - module_ns->assign(c->name, - Swig::swig_value_ref(new octave_swig_type(0, swig_types[j]))); - } - - if (!SWIG_init_user(module_ns)) { - delete module_ns; - module_ns = 0; - return octave_value_list(); - } - - SWIG_InstallOps(octave_swig_ref::static_type_id()); - - octave_swig_type::swig_member_const_iterator mb; - for (mb = module_ns->swig_members_begin(); mb != module_ns->swig_members_end(); ++mb) { - if (mb->second.first && mb->second.first->method) { - if (!SWIG_Octave_InstallFunction(me, mb->first)) { - return octave_value_list(); - } - } - } - -#if !SWIG_OCTAVE_PREREQ(3, 2, 0) - mlock(me->name()); -#else - mlock(); -#endif - } - - octave_swig_type::swig_member_const_iterator mb; - for (mb = module_ns->swig_members_begin(); mb != module_ns->swig_members_end(); ++mb) { - if (mb->second.second.is_defined()) { - SWIG_Octave_SetGlobalValue(mb->first, mb->second.second); - SWIG_Octave_LinkGlobalValue(mb->first); - } - } - - SWIG_Octave_SetGlobalValue(SWIG_name_d, module_ns->as_value()); - SWIG_Octave_LinkGlobalValue(SWIG_name_d); - - return octave_value_list(); -} - -static bool SWIG_init_user(octave_swig_type* module_ns) -{ - SWIG_Octave_SetConstant(module_ns, "griddyn_ok", SWIG_From_int(static_cast(griddyn_ok))); - SWIG_Octave_SetConstant(module_ns, - "griddyn_invalid_object", - SWIG_From_int(static_cast(griddyn_invalid_object))); - SWIG_Octave_SetConstant(module_ns, - "griddyn_invalid_parameter_value", - SWIG_From_int(static_cast(griddyn_invalid_parameter_value))); - SWIG_Octave_SetConstant(module_ns, - "griddyn_unknown_parameter", - SWIG_From_int(static_cast(griddyn_unknown_parameter))); - SWIG_Octave_SetConstant(module_ns, - "griddyn_add_failure", - SWIG_From_int(static_cast(griddyn_add_failure))); - SWIG_Octave_SetConstant(module_ns, - "griddyn_remove_failure", - SWIG_From_int(static_cast(griddyn_remove_failure))); - SWIG_Octave_SetConstant(module_ns, - "griddyn_query_load_failure", - SWIG_From_int(static_cast(griddyn_query_load_failure))); - SWIG_Octave_SetConstant(module_ns, - "griddyn_file_load_failure", - SWIG_From_int(static_cast(griddyn_file_load_failure))); - SWIG_Octave_SetConstant(module_ns, - "griddyn_solve_error", - SWIG_From_int(static_cast(griddyn_solve_error))); - SWIG_Octave_SetConstant(module_ns, - "griddyn_object_not_initialized", - SWIG_From_int(static_cast(griddyn_object_not_initialized))); - SWIG_Octave_SetConstant(module_ns, - "griddyn_invalid_function_call", - SWIG_From_int(static_cast(griddyn_invalid_function_call))); - SWIG_Octave_SetConstant(module_ns, - "griddyn_function_failure", - SWIG_From_int(static_cast(griddyn_function_failure))); - SWIG_Octave_SetConstant(module_ns, "GRIDDYN_PENDING", SWIG_From_int(static_cast((25)))); - SWIG_Octave_SetConstant(module_ns, "GRIDDYN_COMPLETE", SWIG_From_int(static_cast((30)))); - return true; -} diff --git a/interfaces/octave/griddynOctave.i b/interfaces/octave/griddynOctave.i deleted file mode 100644 index de952060d..000000000 --- a/interfaces/octave/griddynOctave.i +++ /dev/null @@ -1 +0,0 @@ -%include "../griddyn.i" diff --git a/interfaces/octave/mkgriddynOCTFile.m.in b/interfaces/octave/mkgriddynOCTFile.m.in deleted file mode 100644 index f26dd4ea4..000000000 --- a/interfaces/octave/mkgriddynOCTFile.m.in +++ /dev/null @@ -1 +0,0 @@ -mkoctfile('-I${LIBRARY_INCLUDE_LOCATION}', '-L${LIBRARY_BUILD_LOCATION} -l${LIBRARY_NAME} -o${BUILD_DIR}/griddyn.oct','${BUILD_FILE}') diff --git a/interfaces/octave/modifyOctSourceFile.cmake b/interfaces/octave/modifyOctSourceFile.cmake deleted file mode 100644 index 2b722b7ec..000000000 --- a/interfaces/octave/modifyOctSourceFile.cmake +++ /dev/null @@ -1,26 +0,0 @@ -# modifyOctSourceFile.cmake - -if(WIN32) - if(griddynOCTAVE_wrap.cxx IS_NEWER_THAN griddynOCTAVE_wrap.cpp) - if(VOID_SIZE EQUAL 8) - file(READ griddynOCTAVE_wrap.cxx GRIDDYN_OCT_SOURCE) - - string(REPLACE "long swig_this\(\) const" "long long swig_this\(\)" GRIDDYN_OCT_SOURCE - "${GRIDDYN_OCT_SOURCE}" - ) - string(REPLACE "return \(long\) this" "return \(long long\) this" GRIDDYN_OCT_SOURCE - "${GRIDDYN_OCT_SOURCE}" - ) - string(REPLACE "\(long\) types[0].second.ptr" "\(long long\) types[0].second.ptr" - GRIDDYN_OCT_SOURCE "${GRIDDYN_OCT_SOURCE}" - ) - - file(WRITE griddynOCTAVE_wrap.cpp "${GRIDDYN_OCT_SOURCE}") - set(FILE_WRITTEN TRUE) - endif() - endif() -endif(WIN32) - -if(NOT FILE_WRITTEN) - configure_file(griddynOCTAVE_wrap.cxx griddynOCTAVE_wrap.cpp COPYONLY) -endif() diff --git a/interfaces/python/CMakeLists.txt b/interfaces/python/CMakeLists.txt deleted file mode 100644 index fdd71c79f..000000000 --- a/interfaces/python/CMakeLists.txt +++ /dev/null @@ -1,76 +0,0 @@ -if(DISABLE_SWIG OR NOT SWIG_EXECUTABLE) - - message("Building without swig") - - add_custom_target("griddynPYTHON" ALL) - - configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in ${CMAKE_CURRENT_BINARY_DIR}/setup.py) - configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/griddynPythonPYTHON_wrap.c - ${CMAKE_CURRENT_BINARY_DIR}/griddynPythonPYTHON_wrap.c COPYONLY - ) - configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/griddyn.py ${CMAKE_CURRENT_BINARY_DIR}/griddyn.py COPYONLY - ) - - add_custom_target("griddynPYTHONEXT" ALL DEPENDS griddyn_shared_lib griddynPYTHON) - - add_custom_command( - TARGET "griddynPYTHONEXT" - POST_BUILD - COMMAND "pip" # - ARGS "install" "-e" "." - WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" - COMMENT "Building Python extension" - ) -else() # use swig in this branch - # https://stackoverflow.com/a/3818084/5451769 - if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) - # Update if necessary - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-long-long -Wno-overlength-strings") - endif() - - set(CMAKE_SWIG_FLAGS ${CMAKE_SWIG_FLAGS} "-DPy_USING_UNICODE") - set(CMAKE_SWIG_FLAGS ${CMAKE_SWIG_FLAGS} "-noproxydel") - - find_package(PythonLibs REQUIRED) - include_directories(${PYTHON_INCLUDE_PATH}) - include_directories(${PYTHON_INCLUDE_DIRS}) - - set(CMAKE_MACOSX_RPATH 1) - set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}") - - set_property(SOURCE ../griddyn.i PROPERTY SWIG_MODULE_NAME griddyn) - - if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_GREATER 3.7) - swig_add_library( - griddyn - TYPE MODULE - LANGUAGE python - SOURCES griddynPython.i - ) - else(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_GREATER 3.7) - swig_add_module(griddyn python griddynPython.i) - endif(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} VERSION_GREATER 3.7) - - swig_link_libraries(griddyn griddyn_shared_lib) - - if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - # https://groups.google.com/a/continuum.io/d/msg/anaconda/057P4uNWyCU/Iem6OtjBCQAJ - set_target_properties(_griddyn PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") - else() - swig_link_libraries(griddyn ${PYTHON_LIBRARIES}) - endif() - - set_target_properties(_griddyn PROPERTIES FOLDER interfaces) - - # execute_process(COMMAND python -c "from distutils.sysconfig import get_python_lib; print - # get_python_lib()" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE) - - install(TARGETS _griddyn DESTINATION python COMPONENT python) - -endif() - -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/griddyn.py DESTINATION python COMPONENT python) -install(FILES $ DESTINATION python COMPONENT python) -install(FILES ${KEY_LIBRARY_FILES} DESTINATION python COMPONENT python) diff --git a/interfaces/python/CMakeLists.txt.old b/interfaces/python/CMakeLists.txt.old deleted file mode 100644 index cc4c950ed..000000000 --- a/interfaces/python/CMakeLists.txt.old +++ /dev/null @@ -1,58 +0,0 @@ -cmake_minimum_required(VERSION 3.4) - -FIND_PACKAGE(PythonLibs REQUIRED) -FIND_PACKAGE(PythonInterp REQUIRED) - -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -include_directories(${PYTHON_INCLUDE_PATH}) -include_directories(${PYTHON_INCLUDE_DIRS}) -INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/gridDynCombined) -INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src/griddyn_shared) -link_directories(${external_link_directories}) - -make_directory(${PROJECT_BINARY_DIR}/python/griddyn) - -set(PYTHONFLAG "") -set(CMAKE_SWIG_FLAGS ${CMAKE_SWIG_FLAGS} "-DPy_USING_UNICODE") -set(CMAKE_SWIG_FLAGS ${CMAKE_SWIG_FLAGS} "-noproxydel") - -set(CMAKE_SWIG_OUTDIR ${CMAKE_CURRENT_SOURCE_DIR}/target${PYTHONFLAG}/extra) -set(CMAKE_SWIG_WRAP_OUTDIR ${CMAKE_CURRENT_SOURCE_DIR}/target${PYTHONFLAG}/source/dummy) - -set_property(SOURCE ../griddyn.i PROPERTY CPLUSPLUS ON) -set_property(SOURCE ../griddyn.i PROPERTY SWIG_MODULE_NAME griddyn) -# Generate SWIG wrapper -# Add swig module -swig_module_initialize(griddyn python) -message("Python libraries = ${PYTHON_LIBRARIES}") -message("Python = ${PYTHON_EXECUTABLE}") -message("griddynDynCombined=" gridDynCombined) -message("griddyn_shared_lib=" griddyn_shared_lib) - -swig_add_source_to_module(griddyn FALSE ../griddyn.i ../../src/griddyn_shared/griddyn_export.h ../../src/griddyn_shared/griddyn_export_advanced.h) -swig_add_library(griddyn LANGUAGE python SOURCES ../griddyn.i) -swig_link_libraries(griddyn ${PYTHON_LIBRARIES} griddyn_shared_lib) -get_directory_property(swig_extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES) -set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${PYTHON_FILE}") - -set(SETUP_PY_IN ${CMAKE_CURRENT_SOURCE_DIR}/setup.py.in) -set(SETUP_PY_OUT ${CMAKE_CURRENT_BINARY_DIR}/setup.py) -set(DEPS ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py) -set(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pythonlog) -set(MODULE ${CMAKE_CURRENT_BINARY_DIR}/griddyn) - -configure_file(${SETUP_PY_IN} ${SETUP_PY_OUT}) -file(MAKE_DIRECTORY ${MODULE}) -file(COPY ${DEPS} DESTINATION ${MODULE}) - -add_custom_command(OUTPUT ${OUTPUT} POST_BUILD - COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY_OUT} build - COMMAND ${CMAKE_COMMAND} -E touch ${OUTPUT} - ) - -add_custom_target(make_gen DEPENDS ${OUTPUT}) -target_link_libraries(_griddyn griddyn_shared_lib) - -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/_griddyn.so DESTINATION ${MODULE}) -install(FILES ${CMAKE_SWIG_OUTDIR}/griddyn.py DESTINATION ${MODULE}) -install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY_OUT} install)") diff --git a/interfaces/python/__init__.py b/interfaces/python/__init__.py deleted file mode 100644 index 1b5343b76..000000000 --- a/interfaces/python/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from griddyn import * diff --git a/interfaces/python/griddyn.py b/interfaces/python/griddyn.py deleted file mode 100644 index 92fb4ec9c..000000000 --- a/interfaces/python/griddyn.py +++ /dev/null @@ -1,329 +0,0 @@ -# This file was automatically generated by SWIG (http://www.swig.org). -# Version 3.0.12 -# -# Do not make changes to this file unless you know what you are doing--modify -# the SWIG interface file instead. - -from sys import version_info as _swig_python_version_info - -if _swig_python_version_info >= (2, 7, 0): - - def swig_import_helper(): - import importlib - - pkg = __name__.rpartition(".")[0] - mname = ".".join((pkg, "_griddyn")).lstrip(".") - try: - return importlib.import_module(mname) - except ImportError: - return importlib.import_module("_griddyn") - - _griddyn = swig_import_helper() - del swig_import_helper -elif _swig_python_version_info >= (2, 6, 0): - - def swig_import_helper(): - from os.path import dirname - import imp - - fp = None - try: - fp, pathname, description = imp.find_module("_griddyn", [dirname(__file__)]) - except ImportError: - import _griddyn - - return _griddyn - try: - _mod = imp.load_module("_griddyn", fp, pathname, description) - finally: - if fp is not None: - fp.close() - return _mod - - _griddyn = swig_import_helper() - del swig_import_helper -else: - import _griddyn -del _swig_python_version_info - -try: - _swig_property = property -except NameError: - pass # Python < 2.2 doesn't have 'property'. - -try: - import builtins as __builtin__ -except ImportError: - import __builtin__ - - -def _swig_setattr_nondynamic(self, class_type, name, value, static=1): - if name == "thisown": - return self.this.own(value) - if name == "this": - if type(value).__name__ == "SwigPyObject": - self.__dict__[name] = value - return - method = class_type.__swig_setmethods__.get(name, None) - if method: - return method(self, value) - if not static: - if _newclass: - object.__setattr__(self, name, value) - else: - self.__dict__[name] = value - else: - raise AttributeError("You cannot add attributes to %s" % self) - - -def _swig_setattr(self, class_type, name, value): - return _swig_setattr_nondynamic(self, class_type, name, value, 0) - - -def _swig_getattr(self, class_type, name): - if name == "thisown": - return self.this.own() - method = class_type.__swig_getmethods__.get(name, None) - if method: - return method(self) - raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name)) - - -def _swig_repr(self): - try: - strthis = "proxy of " + self.this.__repr__() - except __builtin__.Exception: - strthis = "" - return "<%s.%s; %s >" % ( - self.__class__.__module__, - self.__class__.__name__, - strthis, - ) - - -try: - _object = object - _newclass = 1 -except __builtin__.Exception: - - class _object: - pass - - _newclass = 0 - - -def new_doublep(): - return _griddyn.new_doublep() - - -new_doublep = _griddyn.new_doublep - - -def copy_doublep(value): - return _griddyn.copy_doublep(value) - - -copy_doublep = _griddyn.copy_doublep - - -def delete_doublep(obj): - return _griddyn.delete_doublep(obj) - - -delete_doublep = _griddyn.delete_doublep - - -def doublep_assign(obj, value): - return _griddyn.doublep_assign(obj, value) - - -doublep_assign = _griddyn.doublep_assign - - -def doublep_value(obj): - return _griddyn.doublep_value(obj) - - -doublep_value = _griddyn.doublep_value - - -def new_charp(): - return _griddyn.new_charp() - - -new_charp = _griddyn.new_charp - - -def copy_charp(value): - return _griddyn.copy_charp(value) - - -copy_charp = _griddyn.copy_charp - - -def delete_charp(obj): - return _griddyn.delete_charp(obj) - - -delete_charp = _griddyn.delete_charp - - -def charp_assign(obj, value): - return _griddyn.charp_assign(obj, value) - - -charp_assign = _griddyn.charp_assign - - -def charp_value(obj): - return _griddyn.charp_value(obj) - - -charp_value = _griddyn.charp_value - - -class doubleArray(_object): - __swig_setmethods__ = {} - __setattr__ = lambda self, name, value: _swig_setattr(self, doubleArray, name, value) - __swig_getmethods__ = {} - __getattr__ = lambda self, name: _swig_getattr(self, doubleArray, name) - __repr__ = _swig_repr - - def __init__(self, nelements): - this = _griddyn.new_doubleArray(nelements) - try: - self.this.append(this) - except __builtin__.Exception: - self.this = this - - __swig_destroy__ = _griddyn.delete_doubleArray - - def __getitem__(self, index): - return _griddyn.doubleArray___getitem__(self, index) - - def __setitem__(self, index, value): - return _griddyn.doubleArray___setitem__(self, index, value) - - def cast(self): - return _griddyn.doubleArray_cast(self) - - if _newclass: - frompointer = staticmethod(_griddyn.doubleArray_frompointer) - else: - frompointer = _griddyn.doubleArray_frompointer - - -doubleArray_swigregister = _griddyn.doubleArray_swigregister -doubleArray_swigregister(doubleArray) - - -def doubleArray_frompointer(t): - return _griddyn.doubleArray_frompointer(t) - - -doubleArray_frompointer = _griddyn.doubleArray_frompointer - -griddyn_ok = _griddyn.griddyn_ok -griddyn_invalid_object = _griddyn.griddyn_invalid_object -griddyn_invalid_parameter_value = _griddyn.griddyn_invalid_parameter_value -griddyn_unknown_parameter = _griddyn.griddyn_unknown_parameter -griddyn_add_failure = _griddyn.griddyn_add_failure -griddyn_remove_failure = _griddyn.griddyn_remove_failure -griddyn_query_load_failure = _griddyn.griddyn_query_load_failure -griddyn_file_load_failure = _griddyn.griddyn_file_load_failure -griddyn_solve_error = _griddyn.griddyn_solve_error -griddyn_object_not_initialized = _griddyn.griddyn_object_not_initialized -griddyn_invalid_function_call = _griddyn.griddyn_invalid_function_call -griddyn_function_failure = _griddyn.griddyn_function_failure -GRIDDYN_PENDING = _griddyn.GRIDDYN_PENDING -GRIDDYN_COMPLETE = _griddyn.GRIDDYN_COMPLETE - - -gridDynObjectCreate = _griddyn.gridDynObjectCreate -gridDynObjectClone = _griddyn.gridDynObjectClone -gridDynObjectFree = _griddyn.gridDynObjectFree -gridDynObjectAdd = _griddyn.gridDynObjectAdd -gridDynObjectRemove = _griddyn.gridDynObjectRemove -gridDynObjectSetString = _griddyn.gridDynObjectSetString -gridDynObjectSetValue = _griddyn.gridDynObjectSetValue -gridDynObjectSetValueUnits = _griddyn.gridDynObjectSetValueUnits -gridDynObjectSetFlag = _griddyn.gridDynObjectSetFlag -gridDynObjectGetString = _griddyn.gridDynObjectGetString -gridDynObjectGetValue = _griddyn.gridDynObjectGetValue -gridDynObjectGetValueUnits = _griddyn.gridDynObjectGetValueUnits -gridDynObjectGetFlag = _griddyn.gridDynObjectGetFlag -gridDynObjectFind = _griddyn.gridDynObjectFind -gridDynObjectGetSubObject = _griddyn.gridDynObjectGetSubObject -gridDynObjectFindByUserId = _griddyn.gridDynObjectFindByUserId -gridDynObjectGetParent = _griddyn.gridDynObjectGetParent -gridDynObjectGetType = _griddyn.gridDynObjectGetType - - -gridDynSimulationCreate = _griddyn.gridDynSimulationCreate -gridDynSimulationFree = _griddyn.gridDynSimulationFree -gridDynSimulationInitializeFromString = _griddyn.gridDynSimulationInitializeFromString -gridDynSimulationInitializeFromArgs = _griddyn.gridDynSimulationInitializeFromArgs -gridDynSimulationLoadfile = _griddyn.gridDynSimulationLoadfile -gridDynSimulationAddCommand = _griddyn.gridDynSimulationAddCommand -gridDynSimulationPowerflowInitialize = _griddyn.gridDynSimulationPowerflowInitialize -gridDynSimulationPowerflow = _griddyn.gridDynSimulationPowerflow -gridDynSimulationDynamicInitialize = _griddyn.gridDynSimulationDynamicInitialize -gridDynSimulationReset = _griddyn.gridDynSimulationReset -gridDynSimulationGetCurrentTime = _griddyn.gridDynSimulationGetCurrentTime -gridDynSimulationRun = _griddyn.gridDynSimulationRun -gridDynSimulationRunTo = _griddyn.gridDynSimulationRunTo -gridDynSimulationStep = _griddyn.gridDynSimulationStep -gridDynSimulationRunAsync = _griddyn.gridDynSimulationRunAsync -gridDynSimulationRunToAsync = _griddyn.gridDynSimulationRunToAsync -gridDynSimulationStepAsync = _griddyn.gridDynSimulationStepAsync -gridDynSimulationGetStatus = _griddyn.gridDynSimulationGetStatus - - -def getSimulationObject(sim): - return _griddyn.getSimulationObject(sim) - - -getSimulationObject = _griddyn.getSimulationObject - - -gridDynSimulationGetSolverKey = _griddyn.gridDynSimulationGetSolverKey -gridDynSolverKeyFree = _griddyn.gridDynSolverKeyFree -gridDynSimulationStateSize = _griddyn.gridDynSimulationStateSize -gridDynSimulationBusCount = _griddyn.gridDynSimulationBusCount -gridDynSimulationLineCount = _griddyn.gridDynSimulationLineCount -gridDynSimulationGetResults = _griddyn.gridDynSimulationGetResults -gridDynSimulationGuessState = _griddyn.gridDynSimulationGuessState -gridDynSimulationSetState = _griddyn.gridDynSimulationSetState -gridDynSimulationGetStateVariableTypes = _griddyn.gridDynSimulationGetStateVariableTypes -gridDynSimulationResidual = _griddyn.gridDynSimulationResidual -gridDynSimulationDerivative = _griddyn.gridDynSimulationDerivative -gridDynSimulationAlgebraicUpdate = _griddyn.gridDynSimulationAlgebraicUpdate -gridDynSimulationJacobian = _griddyn.gridDynSimulationJacobian -gridDynSingleQueryCreate = _griddyn.gridDynSingleQueryCreate -gridDynVectorQueryCreate = _griddyn.gridDynVectorQueryCreate -gridDynSingleQueryFree = _griddyn.gridDynSingleQueryFree -gridDynVectorQueryFree = _griddyn.gridDynVectorQueryFree -gridDynSingleQueryRun = _griddyn.gridDynSingleQueryRun -gridDynVectorQueryRun = _griddyn.gridDynVectorQueryRun -gridDynVectorQueryAppend = _griddyn.gridDynVectorQueryAppend -gridDynSingleQueryUpdate = _griddyn.gridDynSingleQueryUpdate -gridDynVectorQueryUpdate = _griddyn.gridDynVectorQueryUpdate -gridDynEventCreate = _griddyn.gridDynEventCreate -gridDynEventFree = _griddyn.gridDynEventFree -gridDynEventTrigger = _griddyn.gridDynEventTrigger -gridDynEventSchedule = _griddyn.gridDynEventSchedule -gridDynEventSetValue = _griddyn.gridDynEventSetValue -gridDynEventSetString = _griddyn.gridDynEventSetString -gridDynEventSetFlag = _griddyn.gridDynEventSetFlag -gridDynEventSetTarget = _griddyn.gridDynEventSetTarget -gridDynObjectStateSize = _griddyn.gridDynObjectStateSize -gridDynObjectGuessState = _griddyn.gridDynObjectGuessState -gridDynObjectSetState = _griddyn.gridDynObjectSetState -gridDynObjectGetStateVariableTypes = _griddyn.gridDynObjectGetStateVariableTypes -gridDynObjectResidual = _griddyn.gridDynObjectResidual -gridDynObjectDerivative = _griddyn.gridDynObjectDerivative -gridDynObjectAlgebraicUpdate = _griddyn.gridDynObjectAlgebraicUpdate -gridDynObjectJacobian = _griddyn.gridDynObjectJacobian -gridDynObjectIoPartialDerivatives = _griddyn.gridDynObjectIoPartialDerivatives -gridDynObjectOutputPartialDerivatives = _griddyn.gridDynObjectOutputPartialDerivatives -# This file is compatible with both classic and new-style classes. diff --git a/interfaces/python/griddynPython.i b/interfaces/python/griddynPython.i deleted file mode 100644 index e24a9b4bb..000000000 --- a/interfaces/python/griddynPython.i +++ /dev/null @@ -1,2 +0,0 @@ -%include "cstring.i" -%include "../griddyn.i" diff --git a/interfaces/python/griddynPythonPYTHON_wrap.c b/interfaces/python/griddynPythonPYTHON_wrap.c deleted file mode 100644 index 2a313f6e0..000000000 --- a/interfaces/python/griddynPythonPYTHON_wrap.c +++ /dev/null @@ -1,7681 +0,0 @@ -/* ---------------------------------------------------------------------------- - * This file was automatically generated by SWIG (http://www.swig.org). - * Version 3.0.12 - * - * This file is not intended to be easily readable and contains a number of - * coding conventions designed to improve portability and efficiency. Do not make - * changes to this file unless you know what you are doing--modify the SWIG - * interface file instead. - * ----------------------------------------------------------------------------- */ - - -#ifndef SWIGPYTHON -#define SWIGPYTHON -#endif - -#define SWIG_PYTHON_DIRECTOR_NO_VTABLE - -/* ----------------------------------------------------------------------------- - * This section contains generic SWIG labels for method/variable - * declarations/attributes, and other compiler dependent labels. - * ----------------------------------------------------------------------------- */ - -/* template workaround for compilers that cannot correctly implement the C++ standard */ -#ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# elif defined(__HP_aCC) -/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ -/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif -#endif - -/* inline attribute */ -#ifndef SWIGINLINE -# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) -# define SWIGINLINE inline -# else -# define SWIGINLINE -# endif -#endif - -/* attribute recognised by some compilers to avoid 'unused' warnings */ -#ifndef SWIGUNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -# elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) -# else -# define SWIGUNUSED -# endif -#endif - -#ifndef SWIG_MSC_UNSUPPRESS_4505 -# if defined(_MSC_VER) -# pragma warning(disable : 4505) /* unreferenced local function has been removed */ -# endif -#endif - -#ifndef SWIGUNUSEDPARM -# ifdef __cplusplus -# define SWIGUNUSEDPARM(p) -# else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED -# endif -#endif - -/* internal SWIG method */ -#ifndef SWIGINTERN -# define SWIGINTERN static SWIGUNUSED -#endif - -/* internal inline SWIG method */ -#ifndef SWIGINTERNINLINE -# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE -#endif - -/* exporting methods */ -#if defined(__GNUC__) -# if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) -# ifndef GCC_HASCLASSVISIBILITY -# define GCC_HASCLASSVISIBILITY -# endif -# endif -#endif - -#ifndef SWIGEXPORT -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# if defined(STATIC_LINKED) -# define SWIGEXPORT -# else -# define SWIGEXPORT __declspec(dllexport) -# endif -# else -# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) -# define SWIGEXPORT __attribute__ ((visibility("default"))) -# else -# define SWIGEXPORT -# endif -# endif -#endif - -/* calling conventions for Windows */ -#ifndef SWIGSTDCALL -# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# define SWIGSTDCALL __stdcall -# else -# define SWIGSTDCALL -# endif -#endif - -/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ -#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) -# define _CRT_SECURE_NO_DEPRECATE -#endif - -/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ -#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) -# define _SCL_SECURE_NO_DEPRECATE -#endif - -/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */ -#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES) -# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 -#endif - -/* Intel's compiler complains if a variable which was never initialised is - * cast to void, which is a common idiom which we use to indicate that we - * are aware a variable isn't used. So we just silence that warning. - * See: https://github.com/swig/swig/issues/192 for more discussion. - */ -#ifdef __INTEL_COMPILER -# pragma warning disable 592 -#endif - - -#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG) -/* Use debug wrappers with the Python release dll */ -# undef _DEBUG -# include -# define _DEBUG -#else -# include -#endif - -/* ----------------------------------------------------------------------------- - * swigrun.swg - * - * This file contains generic C API SWIG runtime support for pointer - * type checking. - * ----------------------------------------------------------------------------- */ - -/* This should only be incremented when either the layout of swig_type_info changes, - or for whatever reason, the runtime changes incompatibly */ -#define SWIG_RUNTIME_VERSION "4" - -/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ -#ifdef SWIG_TYPE_TABLE -# define SWIG_QUOTE_STRING(x) #x -# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) -# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) -#else -# define SWIG_TYPE_TABLE_NAME -#endif - -/* - You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for - creating a static or dynamic library from the SWIG runtime code. - In 99.9% of the cases, SWIG just needs to declare them as 'static'. - - But only do this if strictly necessary, ie, if you have problems - with your compiler or suchlike. -*/ - -#ifndef SWIGRUNTIME -# define SWIGRUNTIME SWIGINTERN -#endif - -#ifndef SWIGRUNTIMEINLINE -# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE -#endif - -/* Generic buffer size */ -#ifndef SWIG_BUFFER_SIZE -# define SWIG_BUFFER_SIZE 1024 -#endif - -/* Flags for pointer conversions */ -#define SWIG_POINTER_DISOWN 0x1 -#define SWIG_CAST_NEW_MEMORY 0x2 - -/* Flags for new pointer objects */ -#define SWIG_POINTER_OWN 0x1 - - -/* - Flags/methods for returning states. - - The SWIG conversion methods, as ConvertPtr, return an integer - that tells if the conversion was successful or not. And if not, - an error code can be returned (see swigerrors.swg for the codes). - - Use the following macros/flags to set or process the returning - states. - - In old versions of SWIG, code such as the following was usually written: - - if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { - // success code - } else { - //fail code - } - - Now you can be more explicit: - - int res = SWIG_ConvertPtr(obj,vptr,ty.flags); - if (SWIG_IsOK(res)) { - // success code - } else { - // fail code - } - - which is the same really, but now you can also do - - Type *ptr; - int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); - if (SWIG_IsOK(res)) { - // success code - if (SWIG_IsNewObj(res) { - ... - delete *ptr; - } else { - ... - } - } else { - // fail code - } - - I.e., now SWIG_ConvertPtr can return new objects and you can - identify the case and take care of the deallocation. Of course that - also requires SWIG_ConvertPtr to return new result values, such as - - int SWIG_ConvertPtr(obj, ptr,...) { - if () { - if () { - *ptr = ; - return SWIG_NEWOBJ; - } else { - *ptr = ; - return SWIG_OLDOBJ; - } - } else { - return SWIG_BADOBJ; - } - } - - Of course, returning the plain '0(success)/-1(fail)' still works, but you can be - more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the - SWIG errors code. - - Finally, if the SWIG_CASTRANK_MODE is enabled, the result code - allows to return the 'cast rank', for example, if you have this - - int food(double) - int fooi(int); - - and you call - - food(1) // cast rank '1' (1 -> 1.0) - fooi(1) // cast rank '0' - - just use the SWIG_AddCast()/SWIG_CheckState() -*/ - -#define SWIG_OK (0) -#define SWIG_ERROR (-1) -#define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) - -/* The CastRankLimit says how many bits are used for the cast rank */ -#define SWIG_CASTRANKLIMIT (1 << 8) -/* The NewMask denotes the object was created (using new/malloc) */ -#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) -/* The TmpMask is for in/out typemaps that use temporal objects */ -#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) -/* Simple returning values */ -#define SWIG_BADOBJ (SWIG_ERROR) -#define SWIG_OLDOBJ (SWIG_OK) -#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) -#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) -/* Check, add and del mask methods */ -#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) -#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) -#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) -#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) -#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) -#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) - -/* Cast-Rank Mode */ -#if defined(SWIG_CASTRANK_MODE) -# ifndef SWIG_TypeRank -# define SWIG_TypeRank unsigned long -# endif -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ -# define SWIG_MAXCASTRANK (2) -# endif -# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) -# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) { - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; -} -SWIGINTERNINLINE int SWIG_CheckState(int r) { - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; -} -#else /* no cast-rank mode */ -# define SWIG_AddCast(r) (r) -# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) -#endif - - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -typedef void *(*swig_converter_func)(void *, int *); -typedef struct swig_type_info *(*swig_dycast_func)(void **); - -/* Structure to store information on one type */ -typedef struct swig_type_info { - const char *name; /* mangled name of this type */ - const char *str; /* human readable name of this type */ - swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ - struct swig_cast_info *cast; /* linked list of types that can cast into this type */ - void *clientdata; /* language specific type data */ - int owndata; /* flag if the structure owns the clientdata */ -} swig_type_info; - -/* Structure to store a type and conversion function used for casting */ -typedef struct swig_cast_info { - swig_type_info *type; /* pointer to type that is equivalent to this type */ - swig_converter_func converter; /* function to cast the void pointers */ - struct swig_cast_info *next; /* pointer to next cast in linked list */ - struct swig_cast_info *prev; /* pointer to the previous cast */ -} swig_cast_info; - -/* Structure used to store module information - * Each module generates one structure like this, and the runtime collects - * all of these structures and stores them in a circularly linked list.*/ -typedef struct swig_module_info { - swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ - size_t size; /* Number of types in this module */ - struct swig_module_info *next; /* Pointer to next element in circularly linked list */ - swig_type_info **type_initial; /* Array of initially generated type structures */ - swig_cast_info **cast_initial; /* Array of initially generated casting structures */ - void *clientdata; /* Language specific module data */ -} swig_module_info; - -/* - Compare two type names skipping the space characters, therefore - "char*" == "char *" and "Class" == "Class", etc. - - Return 0 when the two name types are equivalent, as in - strncmp, but skipping ' '. -*/ -SWIGRUNTIME int -SWIG_TypeNameComp(const char *f1, const char *l1, - const char *f2, const char *l2) { - for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { - while ((*f1 == ' ') && (f1 != l1)) ++f1; - while ((*f2 == ' ') && (f2 != l2)) ++f2; - if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; - } - return (int)((l1 - f1) - (l2 - f2)); -} - -/* - Check type equivalence in a name list like ||... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb -*/ -SWIGRUNTIME int -SWIG_TypeCmp(const char *nb, const char *tb) { - int equiv = 1; - const char* te = tb + strlen(tb); - const char* ne = nb; - while (equiv != 0 && *ne) { - for (nb = ne; *ne; ++ne) { - if (*ne == '|') break; - } - equiv = SWIG_TypeNameComp(nb, ne, tb, te); - if (*ne) ++ne; - } - return equiv; -} - -/* - Check type equivalence in a name list like ||... - Return 0 if not equal, 1 if equal -*/ -SWIGRUNTIME int -SWIG_TypeEquiv(const char *nb, const char *tb) { - return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; -} - -/* - Check the typename -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheck(const char *c, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (strcmp(iter->type->name, c) == 0) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison -*/ -SWIGRUNTIME swig_cast_info * -SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { - if (ty) { - swig_cast_info *iter = ty->cast; - while (iter) { - if (iter->type == from) { - if (iter == ty->cast) - return iter; - /* Move iter to the top of the linked list */ - iter->prev->next = iter->next; - if (iter->next) - iter->next->prev = iter->prev; - iter->next = ty->cast; - iter->prev = 0; - if (ty->cast) ty->cast->prev = iter; - ty->cast = iter; - return iter; - } - iter = iter->next; - } - } - return 0; -} - -/* - Cast a pointer up an inheritance hierarchy -*/ -SWIGRUNTIMEINLINE void * -SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); -} - -/* - Dynamic pointer casting. Down an inheritance hierarchy -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { - swig_type_info *lastty = ty; - if (!ty || !ty->dcast) return ty; - while (ty && (ty->dcast)) { - ty = (*ty->dcast)(ptr); - if (ty) lastty = ty; - } - return lastty; -} - -/* - Return the name associated with this type -*/ -SWIGRUNTIMEINLINE const char * -SWIG_TypeName(const swig_type_info *ty) { - return ty->name; -} - -/* - Return the pretty name associated with this type, - that is an unmangled type name in a form presentable to the user. -*/ -SWIGRUNTIME const char * -SWIG_TypePrettyName(const swig_type_info *type) { - /* The "str" field contains the equivalent pretty names of the - type, separated by vertical-bar characters. We choose - to print the last name, as it is often (?) the most - specific. */ - if (!type) return NULL; - if (type->str != NULL) { - const char *last_name = type->str; - const char *s; - for (s = type->str; *s; s++) - if (*s == '|') last_name = s+1; - return last_name; - } - else - return type->name; -} - -/* - Set the clientdata field for a type -*/ -SWIGRUNTIME void -SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { - swig_cast_info *cast = ti->cast; - /* if (ti->clientdata == clientdata) return; */ - ti->clientdata = clientdata; - - while (cast) { - if (!cast->converter) { - swig_type_info *tc = cast->type; - if (!tc->clientdata) { - SWIG_TypeClientData(tc, clientdata); - } - } - cast = cast->next; - } -} -SWIGRUNTIME void -SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { - SWIG_TypeClientData(ti, clientdata); - ti->owndata = 1; -} - -/* - Search for a swig_type_info structure only by mangled name - Search is a O(log #types) - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_MangledTypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - swig_module_info *iter = start; - do { - if (iter->size) { - size_t l = 0; - size_t r = iter->size - 1; - do { - /* since l+r >= 0, we can (>> 1) instead (/ 2) */ - size_t i = (l + r) >> 1; - const char *iname = iter->types[i]->name; - if (iname) { - int compare = strcmp(name, iname); - if (compare == 0) { - return iter->types[i]; - } else if (compare < 0) { - if (i) { - r = i - 1; - } else { - break; - } - } else if (compare > 0) { - l = i + 1; - } - } else { - break; /* should never happen */ - } - } while (l <= r); - } - iter = iter->next; - } while (iter != end); - return 0; -} - -/* - Search for a swig_type_info structure for either a mangled name or a human readable name. - It first searches the mangled names of the types, which is a O(log #types) - If a type is not found it then searches the human readable names, which is O(#types). - - We start searching at module start, and finish searching when start == end. - Note: if start == end at the beginning of the function, we go all the way around - the circular list. -*/ -SWIGRUNTIME swig_type_info * -SWIG_TypeQueryModule(swig_module_info *start, - swig_module_info *end, - const char *name) { - /* STEP 1: Search the name field using binary search */ - swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); - if (ret) { - return ret; - } else { - /* STEP 2: If the type hasn't been found, do a complete search - of the str field (the human readable name) */ - swig_module_info *iter = start; - do { - size_t i = 0; - for (; i < iter->size; ++i) { - if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) - return iter->types[i]; - } - iter = iter->next; - } while (iter != end); - } - - /* neither found a match */ - return 0; -} - -/* - Pack binary data into a string -*/ -SWIGRUNTIME char * -SWIG_PackData(char *c, void *ptr, size_t sz) { - static const char hex[17] = "0123456789abcdef"; - const unsigned char *u = (unsigned char *) ptr; - const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - unsigned char uu = *u; - *(c++) = hex[(uu & 0xf0) >> 4]; - *(c++) = hex[uu & 0xf]; - } - return c; -} - -/* - Unpack binary data from a string -*/ -SWIGRUNTIME const char * -SWIG_UnpackData(const char *c, void *ptr, size_t sz) { - unsigned char *u = (unsigned char *) ptr; - const unsigned char *eu = u + sz; - for (; u != eu; ++u) { - char d = *(c++); - unsigned char uu; - if ((d >= '0') && (d <= '9')) - uu = (unsigned char)((d - '0') << 4); - else if ((d >= 'a') && (d <= 'f')) - uu = (unsigned char)((d - ('a'-10)) << 4); - else - return (char *) 0; - d = *(c++); - if ((d >= '0') && (d <= '9')) - uu |= (unsigned char)(d - '0'); - else if ((d >= 'a') && (d <= 'f')) - uu |= (unsigned char)(d - ('a'-10)); - else - return (char *) 0; - *u = uu; - } - return c; -} - -/* - Pack 'void *' into a string buffer. -*/ -SWIGRUNTIME char * -SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { - char *r = buff; - if ((2*sizeof(void *) + 2) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,&ptr,sizeof(void *)); - if (strlen(name) + 1 > (bsz - (r - buff))) return 0; - strcpy(r,name); - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - *ptr = (void *) 0; - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sizeof(void *)); -} - -SWIGRUNTIME char * -SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { - char *r = buff; - size_t lname = (name ? strlen(name) : 0); - if ((2*sz + 2 + lname) > bsz) return 0; - *(r++) = '_'; - r = SWIG_PackData(r,ptr,sz); - if (lname) { - strncpy(r,name,lname+1); - } else { - *r = 0; - } - return buff; -} - -SWIGRUNTIME const char * -SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { - if (*c != '_') { - if (strcmp(c,"NULL") == 0) { - memset(ptr,0,sz); - return name; - } else { - return 0; - } - } - return SWIG_UnpackData(++c,ptr,sz); -} - -#ifdef __cplusplus -} -#endif - -/* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 -#define SWIG_SystemError -10 -#define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 -#define SWIG_NullReferenceError -13 - - - -/* Compatibility macros for Python 3 */ -#if PY_VERSION_HEX >= 0x03000000 - -#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type) -#define PyInt_Check(x) PyLong_Check(x) -#define PyInt_AsLong(x) PyLong_AsLong(x) -#define PyInt_FromLong(x) PyLong_FromLong(x) -#define PyInt_FromSize_t(x) PyLong_FromSize_t(x) -#define PyString_Check(name) PyBytes_Check(name) -#define PyString_FromString(x) PyUnicode_FromString(x) -#define PyString_Format(fmt, args) PyUnicode_Format(fmt, args) -#define PyString_AsString(str) PyBytes_AsString(str) -#define PyString_Size(str) PyBytes_Size(str) -#define PyString_InternFromString(key) PyUnicode_InternFromString(key) -#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE -#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x) -#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x) - -#endif - -#ifndef Py_TYPE -# define Py_TYPE(op) ((op)->ob_type) -#endif - -/* SWIG APIs for compatibility of both Python 2 & 3 */ - -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_Python_str_FromFormat PyUnicode_FromFormat -#else -# define SWIG_Python_str_FromFormat PyString_FromFormat -#endif - - -/* Warning: This function will allocate a new string in Python 3, - * so please call SWIG_Python_str_DelForPy3(x) to free the space. - */ -SWIGINTERN char* -SWIG_Python_str_AsChar(PyObject *str) -{ -#if PY_VERSION_HEX >= 0x03000000 - char *cstr; - char *newstr; - Py_ssize_t len; - str = PyUnicode_AsUTF8String(str); - PyBytes_AsStringAndSize(str, &cstr, &len); - newstr = (char *) malloc(len+1); - memcpy(newstr, cstr, len+1); - Py_XDECREF(str); - return newstr; -#else - return PyString_AsString(str); -#endif -} - -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_Python_str_DelForPy3(x) free( (void*) (x) ) -#else -# define SWIG_Python_str_DelForPy3(x) -#endif - - -SWIGINTERN PyObject* -SWIG_Python_str_FromChar(const char *c) -{ -#if PY_VERSION_HEX >= 0x03000000 - return PyUnicode_FromString(c); -#else - return PyString_FromString(c); -#endif -} - -/* Add PyOS_snprintf for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM) -# define PyOS_snprintf _snprintf -# else -# define PyOS_snprintf snprintf -# endif -#endif - -/* A crude PyString_FromFormat implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 - -#ifndef SWIG_PYBUFFER_SIZE -# define SWIG_PYBUFFER_SIZE 1024 -#endif - -static PyObject * -PyString_FromFormat(const char *fmt, ...) { - va_list ap; - char buf[SWIG_PYBUFFER_SIZE * 2]; - int res; - va_start(ap, fmt); - res = vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); -} -#endif - -#ifndef PyObject_DEL -# define PyObject_DEL PyObject_Del -#endif - -/* A crude PyExc_StopIteration exception for old Pythons */ -#if PY_VERSION_HEX < 0x02020000 -# ifndef PyExc_StopIteration -# define PyExc_StopIteration PyExc_RuntimeError -# endif -# ifndef PyObject_GenericGetAttr -# define PyObject_GenericGetAttr 0 -# endif -#endif - -/* Py_NotImplemented is defined in 2.1 and up. */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef Py_NotImplemented -# define Py_NotImplemented PyExc_RuntimeError -# endif -#endif - -/* A crude PyString_AsStringAndSize implementation for old Pythons */ -#if PY_VERSION_HEX < 0x02010000 -# ifndef PyString_AsStringAndSize -# define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;} -# endif -#endif - -/* PySequence_Size for old Pythons */ -#if PY_VERSION_HEX < 0x02000000 -# ifndef PySequence_Size -# define PySequence_Size PySequence_Length -# endif -#endif - -/* PyBool_FromLong for old Pythons */ -#if PY_VERSION_HEX < 0x02030000 -static -PyObject *PyBool_FromLong(long ok) -{ - PyObject *result = ok ? Py_True : Py_False; - Py_INCREF(result); - return result; -} -#endif - -/* Py_ssize_t for old Pythons */ -/* This code is as recommended by: */ -/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ -#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) -typedef int Py_ssize_t; -# define PY_SSIZE_T_MAX INT_MAX -# define PY_SSIZE_T_MIN INT_MIN -typedef inquiry lenfunc; -typedef intargfunc ssizeargfunc; -typedef intintargfunc ssizessizeargfunc; -typedef intobjargproc ssizeobjargproc; -typedef intintobjargproc ssizessizeobjargproc; -typedef getreadbufferproc readbufferproc; -typedef getwritebufferproc writebufferproc; -typedef getsegcountproc segcountproc; -typedef getcharbufferproc charbufferproc; -static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc)) -{ - long result = 0; - PyObject *i = PyNumber_Int(x); - if (i) { - result = PyInt_AsLong(i); - Py_DECREF(i); - } - return result; -} -#endif - -#if PY_VERSION_HEX < 0x02050000 -#define PyInt_FromSize_t(x) PyInt_FromLong((long)x) -#endif - -#if PY_VERSION_HEX < 0x02040000 -#define Py_VISIT(op) \ - do { \ - if (op) { \ - int vret = visit((op), arg); \ - if (vret) \ - return vret; \ - } \ - } while (0) -#endif - -#if PY_VERSION_HEX < 0x02030000 -typedef struct { - PyTypeObject type; - PyNumberMethods as_number; - PyMappingMethods as_mapping; - PySequenceMethods as_sequence; - PyBufferProcs as_buffer; - PyObject *name, *slots; -} PyHeapTypeObject; -#endif - -#if PY_VERSION_HEX < 0x02030000 -typedef destructor freefunc; -#endif - -#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \ - (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \ - (PY_MAJOR_VERSION > 3)) -# define SWIGPY_USE_CAPSULE -# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME) -#endif - -#if PY_VERSION_HEX < 0x03020000 -#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type) -#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name) -#define Py_hash_t long -#endif - -/* ----------------------------------------------------------------------------- - * error manipulation - * ----------------------------------------------------------------------------- */ - -SWIGRUNTIME PyObject* -SWIG_Python_ErrorType(int code) { - PyObject* type = 0; - switch(code) { - case SWIG_MemoryError: - type = PyExc_MemoryError; - break; - case SWIG_IOError: - type = PyExc_IOError; - break; - case SWIG_RuntimeError: - type = PyExc_RuntimeError; - break; - case SWIG_IndexError: - type = PyExc_IndexError; - break; - case SWIG_TypeError: - type = PyExc_TypeError; - break; - case SWIG_DivisionByZero: - type = PyExc_ZeroDivisionError; - break; - case SWIG_OverflowError: - type = PyExc_OverflowError; - break; - case SWIG_SyntaxError: - type = PyExc_SyntaxError; - break; - case SWIG_ValueError: - type = PyExc_ValueError; - break; - case SWIG_SystemError: - type = PyExc_SystemError; - break; - case SWIG_AttributeError: - type = PyExc_AttributeError; - break; - default: - type = PyExc_RuntimeError; - } - return type; -} - - -SWIGRUNTIME void -SWIG_Python_AddErrorMsg(const char* mesg) -{ - PyObject *type = 0; - PyObject *value = 0; - PyObject *traceback = 0; - - if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); - if (value) { - char *tmp; - PyObject *old_str = PyObject_Str(value); - PyErr_Clear(); - Py_XINCREF(type); - - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(old_str); - Py_DECREF(value); - } else { - PyErr_SetString(PyExc_RuntimeError, mesg); - } -} - -#if defined(SWIG_PYTHON_NO_THREADS) -# if defined(SWIG_PYTHON_THREADS) -# undef SWIG_PYTHON_THREADS -# endif -#endif -#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ -# if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) -# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ -# define SWIG_PYTHON_USE_GIL -# endif -# endif -# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ -# ifndef SWIG_PYTHON_INITIALIZE_THREADS -# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() -# endif -# ifdef __cplusplus /* C++ code */ - class SWIG_Python_Thread_Block { - bool status; - PyGILState_STATE state; - public: - void end() { if (status) { PyGILState_Release(state); status = false;} } - SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} - ~SWIG_Python_Thread_Block() { end(); } - }; - class SWIG_Python_Thread_Allow { - bool status; - PyThreadState *save; - public: - void end() { if (status) { PyEval_RestoreThread(save); status = false; }} - SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} - ~SWIG_Python_Thread_Allow() { end(); } - }; -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block -# define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow -# define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end() -# else /* C code */ -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure() -# define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block) -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() -# define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) -# endif -# else /* Old thread way, not implemented, user must provide it */ -# if !defined(SWIG_PYTHON_INITIALIZE_THREADS) -# define SWIG_PYTHON_INITIALIZE_THREADS -# endif -# if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK) -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK -# endif -# if !defined(SWIG_PYTHON_THREAD_END_BLOCK) -# define SWIG_PYTHON_THREAD_END_BLOCK -# endif -# if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW) -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW -# endif -# if !defined(SWIG_PYTHON_THREAD_END_ALLOW) -# define SWIG_PYTHON_THREAD_END_ALLOW -# endif -# endif -#else /* No thread support */ -# define SWIG_PYTHON_INITIALIZE_THREADS -# define SWIG_PYTHON_THREAD_BEGIN_BLOCK -# define SWIG_PYTHON_THREAD_END_BLOCK -# define SWIG_PYTHON_THREAD_BEGIN_ALLOW -# define SWIG_PYTHON_THREAD_END_ALLOW -#endif - -/* ----------------------------------------------------------------------------- - * Python API portion that goes into the runtime - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* ----------------------------------------------------------------------------- - * Constant declarations - * ----------------------------------------------------------------------------- */ - -/* Constant Types */ -#define SWIG_PY_POINTER 4 -#define SWIG_PY_BINARY 5 - -/* Constant information structure */ -typedef struct swig_const_info { - int type; - char *name; - long lvalue; - double dvalue; - void *pvalue; - swig_type_info **ptype; -} swig_const_info; - - -/* ----------------------------------------------------------------------------- - * Wrapper of PyInstanceMethod_New() used in Python 3 - * It is exported to the generated module, used for -fastproxy - * ----------------------------------------------------------------------------- */ -#if PY_VERSION_HEX >= 0x03000000 -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) -{ - return PyInstanceMethod_New(func); -} -#else -SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func)) -{ - return NULL; -} -#endif - -#ifdef __cplusplus -} -#endif - - -/* ----------------------------------------------------------------------------- - * pyrun.swg - * - * This file contains the runtime support for Python modules - * and includes code for managing global variables and pointer - * type checking. - * - * ----------------------------------------------------------------------------- */ - -/* Common SWIG API */ - -/* for raw pointers */ -#define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0) -#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) -#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) - -#ifdef SWIGPYTHON_BUILTIN -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags) -#else -#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) -#endif - -#define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags) - -#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) -#define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) -#define swig_owntype int - -/* for raw packed data */ -#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) - -/* for class or struct pointers */ -#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) -#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) - -/* for C or C++ function pointers */ -#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type) -#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0) - -/* for C++ member pointers, ie, member methods */ -#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty) -#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type) - - -/* Runtime API */ - -#define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata) -#define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) -#define SWIG_NewClientData(obj) SwigPyClientData_New(obj) - -#define SWIG_SetErrorObj SWIG_Python_SetErrorObj -#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg -#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) -#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) -#define SWIG_fail goto fail - - -/* Runtime API implementation */ - -/* Error manipulation */ - -SWIGINTERN void -SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyErr_SetObject(errtype, obj); - Py_DECREF(obj); - SWIG_PYTHON_THREAD_END_BLOCK; -} - -SWIGINTERN void -SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyErr_SetString(errtype, msg); - SWIG_PYTHON_THREAD_END_BLOCK; -} - -#define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) - -/* Set a constant value */ - -#if defined(SWIGPYTHON_BUILTIN) - -SWIGINTERN void -SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) { - PyObject *s = PyString_InternFromString(key); - PyList_Append(seq, s); - Py_DECREF(s); -} - -SWIGINTERN void -SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) { -#if PY_VERSION_HEX < 0x02030000 - PyDict_SetItemString(d, (char *)name, obj); -#else - PyDict_SetItemString(d, name, obj); -#endif - Py_DECREF(obj); - if (public_interface) - SwigPyBuiltin_AddPublicSymbol(public_interface, name); -} - -#else - -SWIGINTERN void -SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { -#if PY_VERSION_HEX < 0x02030000 - PyDict_SetItemString(d, (char *)name, obj); -#else - PyDict_SetItemString(d, name, obj); -#endif - Py_DECREF(obj); -} - -#endif - -/* Append a value to the result obj */ - -SWIGINTERN PyObject* -SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { -#if !defined(SWIG_PYTHON_OUTPUT_TUPLE) - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyList_Check(result)) { - PyObject *o2 = result; - result = PyList_New(1); - PyList_SetItem(result, 0, o2); - } - PyList_Append(result,obj); - Py_DECREF(obj); - } - return result; -#else - PyObject* o2; - PyObject* o3; - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyTuple_Check(result)) { - o2 = result; - result = PyTuple_New(1); - PyTuple_SET_ITEM(result, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SET_ITEM(o3, 0, obj); - o2 = result; - result = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return result; -#endif -} - -/* Unpack the argument tuple */ - -SWIGINTERN Py_ssize_t -SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) -{ - if (!args) { - if (!min && !max) { - return 1; - } else { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", - name, (min == max ? "" : "at least "), (int)min); - return 0; - } - } - if (!PyTuple_Check(args)) { - if (min <= 1 && max >= 1) { - Py_ssize_t i; - objs[0] = args; - for (i = 1; i < max; ++i) { - objs[i] = 0; - } - return 2; - } - PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); - return 0; - } else { - Py_ssize_t l = PyTuple_GET_SIZE(args); - if (l < min) { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at least "), (int)min, (int)l); - return 0; - } else if (l > max) { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", - name, (min == max ? "" : "at most "), (int)max, (int)l); - return 0; - } else { - Py_ssize_t i; - for (i = 0; i < l; ++i) { - objs[i] = PyTuple_GET_ITEM(args, i); - } - for (; l < max; ++l) { - objs[l] = 0; - } - return i + 1; - } - } -} - -/* A functor is a function object with one single object argument */ -#if PY_VERSION_HEX >= 0x02020000 -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL); -#else -#define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj); -#endif - -/* - Helper for static pointer initialization for both C and C++ code, for example - static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...); -*/ -#ifdef __cplusplus -#define SWIG_STATIC_POINTER(var) var -#else -#define SWIG_STATIC_POINTER(var) var = 0; if (!var) var -#endif - -/* ----------------------------------------------------------------------------- - * Pointer declarations - * ----------------------------------------------------------------------------- */ - -/* Flags for new pointer objects */ -#define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1) -#define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN) - -#define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1) - -#define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2) -#define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN) - -#ifdef __cplusplus -extern "C" { -#endif - -/* How to access Py_None */ -#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) -# ifndef SWIG_PYTHON_NO_BUILD_NONE -# ifndef SWIG_PYTHON_BUILD_NONE -# define SWIG_PYTHON_BUILD_NONE -# endif -# endif -#endif - -#ifdef SWIG_PYTHON_BUILD_NONE -# ifdef Py_None -# undef Py_None -# define Py_None SWIG_Py_None() -# endif -SWIGRUNTIMEINLINE PyObject * -_SWIG_Py_None(void) -{ - PyObject *none = Py_BuildValue((char*)""); - Py_DECREF(none); - return none; -} -SWIGRUNTIME PyObject * -SWIG_Py_None(void) -{ - static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); - return none; -} -#endif - -/* The python void return value */ - -SWIGRUNTIMEINLINE PyObject * -SWIG_Py_Void(void) -{ - PyObject *none = Py_None; - Py_INCREF(none); - return none; -} - -/* SwigPyClientData */ - -typedef struct { - PyObject *klass; - PyObject *newraw; - PyObject *newargs; - PyObject *destroy; - int delargs; - int implicitconv; - PyTypeObject *pytype; -} SwigPyClientData; - -SWIGRUNTIMEINLINE int -SWIG_Python_CheckImplicit(swig_type_info *ty) -{ - SwigPyClientData *data = (SwigPyClientData *)ty->clientdata; - return data ? data->implicitconv : 0; -} - -SWIGRUNTIMEINLINE PyObject * -SWIG_Python_ExceptionType(swig_type_info *desc) { - SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0; - PyObject *klass = data ? data->klass : 0; - return (klass ? klass : PyExc_RuntimeError); -} - - -SWIGRUNTIME SwigPyClientData * -SwigPyClientData_New(PyObject* obj) -{ - if (!obj) { - return 0; - } else { - SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData)); - /* the klass element */ - data->klass = obj; - Py_INCREF(data->klass); - /* the newraw method and newargs arguments used to create a new raw instance */ - if (PyClass_Check(obj)) { - data->newraw = 0; - data->newargs = obj; - Py_INCREF(obj); - } else { -#if (PY_VERSION_HEX < 0x02020000) - data->newraw = 0; -#else - data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); -#endif - if (data->newraw) { - Py_INCREF(data->newraw); - data->newargs = PyTuple_New(1); - PyTuple_SetItem(data->newargs, 0, obj); - } else { - data->newargs = obj; - } - Py_INCREF(data->newargs); - } - /* the destroy method, aka as the C++ delete method */ - data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); - if (PyErr_Occurred()) { - PyErr_Clear(); - data->destroy = 0; - } - if (data->destroy) { - int flags; - Py_INCREF(data->destroy); - flags = PyCFunction_GET_FLAGS(data->destroy); -#ifdef METH_O - data->delargs = !(flags & (METH_O)); -#else - data->delargs = 0; -#endif - } else { - data->delargs = 0; - } - data->implicitconv = 0; - data->pytype = 0; - return data; - } -} - -SWIGRUNTIME void -SwigPyClientData_Del(SwigPyClientData *data) { - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); -} - -/* =============== SwigPyObject =====================*/ - -typedef struct { - PyObject_HEAD - void *ptr; - swig_type_info *ty; - int own; - PyObject *next; -#ifdef SWIGPYTHON_BUILTIN - PyObject *dict; -#endif -} SwigPyObject; - - -#ifdef SWIGPYTHON_BUILTIN - -SWIGRUNTIME PyObject * -SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args)) -{ - SwigPyObject *sobj = (SwigPyObject *)v; - - if (!sobj->dict) - sobj->dict = PyDict_New(); - - Py_INCREF(sobj->dict); - return sobj->dict; -} - -#endif - -SWIGRUNTIME PyObject * -SwigPyObject_long(SwigPyObject *v) -{ - return PyLong_FromVoidPtr(v->ptr); -} - -SWIGRUNTIME PyObject * -SwigPyObject_format(const char* fmt, SwigPyObject *v) -{ - PyObject *res = NULL; - PyObject *args = PyTuple_New(1); - if (args) { - if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) { - PyObject *ofmt = SWIG_Python_str_FromChar(fmt); - if (ofmt) { -#if PY_VERSION_HEX >= 0x03000000 - res = PyUnicode_Format(ofmt,args); -#else - res = PyString_Format(ofmt,args); -#endif - Py_DECREF(ofmt); - } - Py_DECREF(args); - } - } - return res; -} - -SWIGRUNTIME PyObject * -SwigPyObject_oct(SwigPyObject *v) -{ - return SwigPyObject_format("%o",v); -} - -SWIGRUNTIME PyObject * -SwigPyObject_hex(SwigPyObject *v) -{ - return SwigPyObject_format("%x",v); -} - -SWIGRUNTIME PyObject * -#ifdef METH_NOARGS -SwigPyObject_repr(SwigPyObject *v) -#else -SwigPyObject_repr(SwigPyObject *v, PyObject *args) -#endif -{ - const char *name = SWIG_TypePrettyName(v->ty); - PyObject *repr = SWIG_Python_str_FromFormat("", (name ? name : "unknown"), (void *)v); - if (v->next) { -# ifdef METH_NOARGS - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next); -# else - PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args); -# endif -# if PY_VERSION_HEX >= 0x03000000 - PyObject *joined = PyUnicode_Concat(repr, nrep); - Py_DecRef(repr); - Py_DecRef(nrep); - repr = joined; -# else - PyString_ConcatAndDel(&repr,nrep); -# endif - } - return repr; -} - -SWIGRUNTIME int -SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w) -{ - void *i = v->ptr; - void *j = w->ptr; - return (i < j) ? -1 : ((i > j) ? 1 : 0); -} - -/* Added for Python 3.x, would it also be useful for Python 2.x? */ -SWIGRUNTIME PyObject* -SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) -{ - PyObject* res; - if( op != Py_EQ && op != Py_NE ) { - Py_INCREF(Py_NotImplemented); - return Py_NotImplemented; - } - res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0); - return res; -} - - -SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void); - -#ifdef SWIGPYTHON_BUILTIN -static swig_type_info *SwigPyObject_stype = 0; -SWIGRUNTIME PyTypeObject* -SwigPyObject_type(void) { - SwigPyClientData *cd; - assert(SwigPyObject_stype); - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; - assert(cd); - assert(cd->pytype); - return cd->pytype; -} -#else -SWIGRUNTIME PyTypeObject* -SwigPyObject_type(void) { - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce(); - return type; -} -#endif - -SWIGRUNTIMEINLINE int -SwigPyObject_Check(PyObject *op) { -#ifdef SWIGPYTHON_BUILTIN - PyTypeObject *target_tp = SwigPyObject_type(); - if (PyType_IsSubtype(op->ob_type, target_tp)) - return 1; - return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0); -#else - return (Py_TYPE(op) == SwigPyObject_type()) - || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0); -#endif -} - -SWIGRUNTIME PyObject * -SwigPyObject_New(void *ptr, swig_type_info *ty, int own); - -SWIGRUNTIME void -SwigPyObject_dealloc(PyObject *v) -{ - SwigPyObject *sobj = (SwigPyObject *) v; - PyObject *next = sobj->next; - if (sobj->own == SWIG_POINTER_OWN) { - swig_type_info *ty = sobj->ty; - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; - PyObject *destroy = data ? data->destroy : 0; - if (destroy) { - /* destroy is always a VARARGS method */ - PyObject *res; - - /* PyObject_CallFunction() has the potential to silently drop - the active active exception. In cases of unnamed temporary - variable or where we just finished iterating over a generator - StopIteration will be active right now, and this needs to - remain true upon return from SwigPyObject_dealloc. So save - and restore. */ - - PyObject *val = NULL, *type = NULL, *tb = NULL; - PyErr_Fetch(&val, &type, &tb); - - if (data->delargs) { - /* we need to create a temporary object to carry the destroy operation */ - PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); - res = SWIG_Python_CallFunctor(destroy, tmp); - Py_DECREF(tmp); - } else { - PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); - PyObject *mself = PyCFunction_GET_SELF(destroy); - res = ((*meth)(mself, v)); - } - if (!res) - PyErr_WriteUnraisable(destroy); - - PyErr_Restore(val, type, tb); - - Py_XDECREF(res); - } -#if !defined(SWIG_PYTHON_SILENT_MEMLEAK) - else { - const char *name = SWIG_TypePrettyName(ty); - printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); - } -#endif - } - Py_XDECREF(next); - PyObject_DEL(v); -} - -SWIGRUNTIME PyObject* -SwigPyObject_append(PyObject* v, PyObject* next) -{ - SwigPyObject *sobj = (SwigPyObject *) v; -#ifndef METH_O - PyObject *tmp = 0; - if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; - next = tmp; -#endif - if (!SwigPyObject_Check(next)) { - PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject"); - return NULL; - } - sobj->next = next; - Py_INCREF(next); - return SWIG_Py_Void(); -} - -SWIGRUNTIME PyObject* -#ifdef METH_NOARGS -SwigPyObject_next(PyObject* v) -#else -SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *) v; - if (sobj->next) { - Py_INCREF(sobj->next); - return sobj->next; - } else { - return SWIG_Py_Void(); - } -} - -SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_disown(PyObject *v) -#else -SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *)v; - sobj->own = 0; - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject* -#ifdef METH_NOARGS -SwigPyObject_acquire(PyObject *v) -#else -SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) -#endif -{ - SwigPyObject *sobj = (SwigPyObject *)v; - sobj->own = SWIG_POINTER_OWN; - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject* -SwigPyObject_own(PyObject *v, PyObject *args) -{ - PyObject *val = 0; -#if (PY_VERSION_HEX < 0x02020000) - if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) -#elif (PY_VERSION_HEX < 0x02050000) - if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) -#else - if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) -#endif - { - return NULL; - } - else - { - SwigPyObject *sobj = (SwigPyObject *)v; - PyObject *obj = PyBool_FromLong(sobj->own); - if (val) { -#ifdef METH_NOARGS - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v); - } else { - SwigPyObject_disown(v); - } -#else - if (PyObject_IsTrue(val)) { - SwigPyObject_acquire(v,args); - } else { - SwigPyObject_disown(v,args); - } -#endif - } - return obj; - } -} - -#ifdef METH_O -static PyMethodDef -swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"}, - {0, 0, 0, 0} -}; -#else -static PyMethodDef -swigobject_methods[] = { - {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, - {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"acquires ownership of the pointer"}, - {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, - {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, - {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, - {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"}, - {0, 0, 0, 0} -}; -#endif - -#if PY_VERSION_HEX < 0x02020000 -SWIGINTERN PyObject * -SwigPyObject_getattr(SwigPyObject *sobj,char *name) -{ - return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); -} -#endif - -SWIGRUNTIME PyTypeObject* -SwigPyObject_TypeOnce(void) { - static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; - - static PyNumberMethods SwigPyObject_as_number = { - (binaryfunc)0, /*nb_add*/ - (binaryfunc)0, /*nb_subtract*/ - (binaryfunc)0, /*nb_multiply*/ - /* nb_divide removed in Python 3 */ -#if PY_VERSION_HEX < 0x03000000 - (binaryfunc)0, /*nb_divide*/ -#endif - (binaryfunc)0, /*nb_remainder*/ - (binaryfunc)0, /*nb_divmod*/ - (ternaryfunc)0,/*nb_power*/ - (unaryfunc)0, /*nb_negative*/ - (unaryfunc)0, /*nb_positive*/ - (unaryfunc)0, /*nb_absolute*/ - (inquiry)0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ -#if PY_VERSION_HEX < 0x03000000 - 0, /*nb_coerce*/ -#endif - (unaryfunc)SwigPyObject_long, /*nb_int*/ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc)SwigPyObject_long, /*nb_long*/ -#else - 0, /*nb_reserved*/ -#endif - (unaryfunc)0, /*nb_float*/ -#if PY_VERSION_HEX < 0x03000000 - (unaryfunc)SwigPyObject_oct, /*nb_oct*/ - (unaryfunc)SwigPyObject_hex, /*nb_hex*/ -#endif -#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */ -#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */ -#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ -#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ -#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ - 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ -#endif - }; - - static PyTypeObject swigpyobject_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"SwigPyObject", /* tp_name */ - sizeof(SwigPyObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyObject_dealloc, /* tp_dealloc */ - 0, /* tp_print */ -#if PY_VERSION_HEX < 0x02020000 - (getattrfunc)SwigPyObject_getattr, /* tp_getattr */ -#else - (getattrfunc)0, /* tp_getattr */ -#endif - (setattrfunc)0, /* tp_setattr */ -#if PY_VERSION_HEX >= 0x03000000 - 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ -#else - (cmpfunc)SwigPyObject_compare, /* tp_compare */ -#endif - (reprfunc)SwigPyObject_repr, /* tp_repr */ - &SwigPyObject_as_number, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - 0, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigobject_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - swigobject_methods, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version_tag */ -#endif -#if PY_VERSION_HEX >= 0x03040000 - 0, /* tp_finalize */ -#endif -#ifdef COUNT_ALLOCS - 0, /* tp_allocs */ - 0, /* tp_frees */ - 0, /* tp_maxalloc */ -#if PY_VERSION_HEX >= 0x02050000 - 0, /* tp_prev */ -#endif - 0 /* tp_next */ -#endif - }; - swigpyobject_type = tmp; - type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - swigpyobject_type.ob_type = &PyType_Type; -#else - if (PyType_Ready(&swigpyobject_type) < 0) - return NULL; -#endif - } - return &swigpyobject_type; -} - -SWIGRUNTIME PyObject * -SwigPyObject_New(void *ptr, swig_type_info *ty, int own) -{ - SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type()); - if (sobj) { - sobj->ptr = ptr; - sobj->ty = ty; - sobj->own = own; - sobj->next = 0; - } - return (PyObject *)sobj; -} - -/* ----------------------------------------------------------------------------- - * Implements a simple Swig Packed type, and use it instead of string - * ----------------------------------------------------------------------------- */ - -typedef struct { - PyObject_HEAD - void *pack; - swig_type_info *ty; - size_t size; -} SwigPyPacked; - -SWIGRUNTIME int -SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) -{ - char result[SWIG_BUFFER_SIZE]; - fputs("pack, v->size, 0, sizeof(result))) { - fputs("at ", fp); - fputs(result, fp); - } - fputs(v->ty->name,fp); - fputs(">", fp); - return 0; -} - -SWIGRUNTIME PyObject * -SwigPyPacked_repr(SwigPyPacked *v) -{ - char result[SWIG_BUFFER_SIZE]; - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { - return SWIG_Python_str_FromFormat("", result, v->ty->name); - } else { - return SWIG_Python_str_FromFormat("", v->ty->name); - } -} - -SWIGRUNTIME PyObject * -SwigPyPacked_str(SwigPyPacked *v) -{ - char result[SWIG_BUFFER_SIZE]; - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ - return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name); - } else { - return SWIG_Python_str_FromChar(v->ty->name); - } -} - -SWIGRUNTIME int -SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w) -{ - size_t i = v->size; - size_t j = w->size; - int s = (i < j) ? -1 : ((i > j) ? 1 : 0); - return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); -} - -SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void); - -SWIGRUNTIME PyTypeObject* -SwigPyPacked_type(void) { - static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce(); - return type; -} - -SWIGRUNTIMEINLINE int -SwigPyPacked_Check(PyObject *op) { - return ((op)->ob_type == SwigPyPacked_TypeOnce()) - || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0); -} - -SWIGRUNTIME void -SwigPyPacked_dealloc(PyObject *v) -{ - if (SwigPyPacked_Check(v)) { - SwigPyPacked *sobj = (SwigPyPacked *) v; - free(sobj->pack); - } - PyObject_DEL(v); -} - -SWIGRUNTIME PyTypeObject* -SwigPyPacked_TypeOnce(void) { - static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; - static PyTypeObject swigpypacked_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { -#if PY_VERSION_HEX>=0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"SwigPyPacked", /* tp_name */ - sizeof(SwigPyPacked), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)SwigPyPacked_dealloc, /* tp_dealloc */ - (printfunc)SwigPyPacked_print, /* tp_print */ - (getattrfunc)0, /* tp_getattr */ - (setattrfunc)0, /* tp_setattr */ -#if PY_VERSION_HEX>=0x03000000 - 0, /* tp_reserved in 3.0.1 */ -#else - (cmpfunc)SwigPyPacked_compare, /* tp_compare */ -#endif - (reprfunc)SwigPyPacked_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - (reprfunc)SwigPyPacked_str, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigpacked_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version_tag */ -#endif -#if PY_VERSION_HEX >= 0x03040000 - 0, /* tp_finalize */ -#endif -#ifdef COUNT_ALLOCS - 0, /* tp_allocs */ - 0, /* tp_frees */ - 0, /* tp_maxalloc */ -#if PY_VERSION_HEX >= 0x02050000 - 0, /* tp_prev */ -#endif - 0 /* tp_next */ -#endif - }; - swigpypacked_type = tmp; - type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - swigpypacked_type.ob_type = &PyType_Type; -#else - if (PyType_Ready(&swigpypacked_type) < 0) - return NULL; -#endif - } - return &swigpypacked_type; -} - -SWIGRUNTIME PyObject * -SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty) -{ - SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type()); - if (sobj) { - void *pack = malloc(size); - if (pack) { - memcpy(pack, ptr, size); - sobj->pack = pack; - sobj->ty = ty; - sobj->size = size; - } else { - PyObject_DEL((PyObject *) sobj); - sobj = 0; - } - } - return (PyObject *) sobj; -} - -SWIGRUNTIME swig_type_info * -SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size) -{ - if (SwigPyPacked_Check(obj)) { - SwigPyPacked *sobj = (SwigPyPacked *)obj; - if (sobj->size != size) return 0; - memcpy(ptr, sobj->pack, size); - return sobj->ty; - } else { - return 0; - } -} - -/* ----------------------------------------------------------------------------- - * pointers/data manipulation - * ----------------------------------------------------------------------------- */ - -SWIGRUNTIMEINLINE PyObject * -_SWIG_This(void) -{ - return SWIG_Python_str_FromChar("this"); -} - -static PyObject *swig_this = NULL; - -SWIGRUNTIME PyObject * -SWIG_This(void) -{ - if (swig_this == NULL) - swig_this = _SWIG_This(); - return swig_this; -} - -/* #define SWIG_PYTHON_SLOW_GETSET_THIS */ - -/* TODO: I don't know how to implement the fast getset in Python 3 right now */ -#if PY_VERSION_HEX>=0x03000000 -#define SWIG_PYTHON_SLOW_GETSET_THIS -#endif - -SWIGRUNTIME SwigPyObject * -SWIG_Python_GetSwigThis(PyObject *pyobj) -{ - PyObject *obj; - - if (SwigPyObject_Check(pyobj)) - return (SwigPyObject *) pyobj; - -#ifdef SWIGPYTHON_BUILTIN - (void)obj; -# ifdef PyWeakref_CheckProxy - if (PyWeakref_CheckProxy(pyobj)) { - pyobj = PyWeakref_GET_OBJECT(pyobj); - if (pyobj && SwigPyObject_Check(pyobj)) - return (SwigPyObject*) pyobj; - } -# endif - return NULL; -#else - - obj = 0; - -#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) - if (PyInstance_Check(pyobj)) { - obj = _PyInstance_Lookup(pyobj, SWIG_This()); - } else { - PyObject **dictptr = _PyObject_GetDictPtr(pyobj); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; - } else { -#ifdef PyWeakref_CheckProxy - if (PyWeakref_CheckProxy(pyobj)) { - PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); - return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; - } -#endif - obj = PyObject_GetAttr(pyobj,SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) PyErr_Clear(); - return 0; - } - } - } -#else - obj = PyObject_GetAttr(pyobj,SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) PyErr_Clear(); - return 0; - } -#endif - if (obj && !SwigPyObject_Check(obj)) { - /* a PyObject is called 'this', try to get the 'real this' - SwigPyObject from it */ - return SWIG_Python_GetSwigThis(obj); - } - return (SwigPyObject *)obj; -#endif -} - -/* Acquire a pointer value */ - -SWIGRUNTIME int -SWIG_Python_AcquirePtr(PyObject *obj, int own) { - if (own == SWIG_POINTER_OWN) { - SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj); - if (sobj) { - int oldown = sobj->own; - sobj->own = own; - return oldown; - } - } - return 0; -} - -/* Convert a pointer value */ - -SWIGRUNTIME int -SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { - int res; - SwigPyObject *sobj; - int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0; - - if (!obj) - return SWIG_ERROR; - if (obj == Py_None && !implicit_conv) { - if (ptr) - *ptr = 0; - return SWIG_OK; - } - - res = SWIG_ERROR; - - sobj = SWIG_Python_GetSwigThis(obj); - if (own) - *own = 0; - while (sobj) { - void *vptr = sobj->ptr; - if (ty) { - swig_type_info *to = sobj->ty; - if (to == ty) { - /* no type cast needed */ - if (ptr) *ptr = vptr; - break; - } else { - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); - if (!tc) { - sobj = (SwigPyObject *)sobj->next; - } else { - if (ptr) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - if (newmemory == SWIG_CAST_NEW_MEMORY) { - assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */ - if (own) - *own = *own | SWIG_CAST_NEW_MEMORY; - } - } - break; - } - } - } else { - if (ptr) *ptr = vptr; - break; - } - } - if (sobj) { - if (own) - *own = *own | sobj->own; - if (flags & SWIG_POINTER_DISOWN) { - sobj->own = 0; - } - res = SWIG_OK; - } else { - if (implicit_conv) { - SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0; - if (data && !data->implicitconv) { - PyObject *klass = data->klass; - if (klass) { - PyObject *impconv; - data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ - impconv = SWIG_Python_CallFunctor(klass, obj); - data->implicitconv = 0; - if (PyErr_Occurred()) { - PyErr_Clear(); - impconv = 0; - } - if (impconv) { - SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv); - if (iobj) { - void *vptr; - res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); - if (SWIG_IsOK(res)) { - if (ptr) { - *ptr = vptr; - /* transfer the ownership to 'ptr' */ - iobj->own = 0; - res = SWIG_AddCast(res); - res = SWIG_AddNewMask(res); - } else { - res = SWIG_AddCast(res); - } - } - } - Py_DECREF(impconv); - } - } - } - } - if (!SWIG_IsOK(res) && obj == Py_None) { - if (ptr) - *ptr = 0; - if (PyErr_Occurred()) - PyErr_Clear(); - res = SWIG_OK; - } - } - return res; -} - -/* Convert a function ptr value */ - -SWIGRUNTIME int -SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { - if (!PyCFunction_Check(obj)) { - return SWIG_ConvertPtr(obj, ptr, ty, 0); - } else { - void *vptr = 0; - - /* here we get the method pointer for callbacks */ - const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); - const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; - if (desc) - desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; - if (!desc) - return SWIG_ERROR; - if (ty) { - swig_cast_info *tc = SWIG_TypeCheck(desc,ty); - if (tc) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc,vptr,&newmemory); - assert(!newmemory); /* newmemory handling not yet implemented */ - } else { - return SWIG_ERROR; - } - } else { - *ptr = vptr; - } - return SWIG_OK; - } -} - -/* Convert a packed value value */ - -SWIGRUNTIME int -SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { - swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz); - if (!to) return SWIG_ERROR; - if (ty) { - if (to != ty) { - /* check type cast? */ - swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); - if (!tc) return SWIG_ERROR; - } - } - return SWIG_OK; -} - -/* ----------------------------------------------------------------------------- - * Create a new pointer object - * ----------------------------------------------------------------------------- */ - -/* - Create a new instance object, without calling __init__, and set the - 'this' attribute. -*/ - -SWIGRUNTIME PyObject* -SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this) -{ -#if (PY_VERSION_HEX >= 0x02020000) - PyObject *inst = 0; - PyObject *newraw = data->newraw; - if (newraw) { - inst = PyObject_Call(newraw, data->newargs, NULL); - if (inst) { -#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - PyDict_SetItem(dict, SWIG_This(), swig_this); - } - } -#else - PyObject *key = SWIG_This(); - PyObject_SetAttr(inst, key, swig_this); -#endif - } - } else { -#if PY_VERSION_HEX >= 0x03000000 - inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None); - if (inst) { - PyObject_SetAttr(inst, SWIG_This(), swig_this); - Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG; - } -#else - PyObject *dict = PyDict_New(); - if (dict) { - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); - } -#endif - } - return inst; -#else -#if (PY_VERSION_HEX >= 0x02010000) - PyObject *inst = 0; - PyObject *dict = PyDict_New(); - if (dict) { - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); - } - return (PyObject *) inst; -#else - PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); - if (inst == NULL) { - return NULL; - } - inst->in_class = (PyClassObject *)data->newargs; - Py_INCREF(inst->in_class); - inst->in_dict = PyDict_New(); - if (inst->in_dict == NULL) { - Py_DECREF(inst); - return NULL; - } -#ifdef Py_TPFLAGS_HAVE_WEAKREFS - inst->in_weakreflist = NULL; -#endif -#ifdef Py_TPFLAGS_GC - PyObject_GC_Init(inst); -#endif - PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); - return (PyObject *) inst; -#endif -#endif -} - -SWIGRUNTIME void -SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) -{ - PyObject *dict; -#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - } - PyDict_SetItem(dict, SWIG_This(), swig_this); - return; - } -#endif - dict = PyObject_GetAttrString(inst, (char*)"__dict__"); - PyDict_SetItem(dict, SWIG_This(), swig_this); - Py_DECREF(dict); -} - - -SWIGINTERN PyObject * -SWIG_Python_InitShadowInstance(PyObject *args) { - PyObject *obj[2]; - if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) { - return NULL; - } else { - SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]); - if (sthis) { - SwigPyObject_append((PyObject*) sthis, obj[1]); - } else { - SWIG_Python_SetSwigThis(obj[0], obj[1]); - } - return SWIG_Py_Void(); - } -} - -/* Create a new pointer object */ - -SWIGRUNTIME PyObject * -SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) { - SwigPyClientData *clientdata; - PyObject * robj; - int own; - - if (!ptr) - return SWIG_Py_Void(); - - clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0; - own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; - if (clientdata && clientdata->pytype) { - SwigPyObject *newobj; - if (flags & SWIG_BUILTIN_TP_INIT) { - newobj = (SwigPyObject*) self; - if (newobj->ptr) { - PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0); - while (newobj->next) - newobj = (SwigPyObject *) newobj->next; - newobj->next = next_self; - newobj = (SwigPyObject *)next_self; -#ifdef SWIGPYTHON_BUILTIN - newobj->dict = 0; -#endif - } - } else { - newobj = PyObject_New(SwigPyObject, clientdata->pytype); -#ifdef SWIGPYTHON_BUILTIN - newobj->dict = 0; -#endif - } - if (newobj) { - newobj->ptr = ptr; - newobj->ty = type; - newobj->own = own; - newobj->next = 0; - return (PyObject*) newobj; - } - return SWIG_Py_Void(); - } - - assert(!(flags & SWIG_BUILTIN_TP_INIT)); - - robj = SwigPyObject_New(ptr, type, own); - if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { - PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - Py_DECREF(robj); - robj = inst; - } - return robj; -} - -/* Create a new packed object */ - -SWIGRUNTIMEINLINE PyObject * -SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { - return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); -} - -/* -----------------------------------------------------------------------------* - * Get type list - * -----------------------------------------------------------------------------*/ - -#ifdef SWIG_LINK_RUNTIME -void *SWIG_ReturnGlobalTypeList(void *); -#endif - -SWIGRUNTIME swig_module_info * -SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) { - static void *type_pointer = (void *)0; - /* first check if module already created */ - if (!type_pointer) { -#ifdef SWIG_LINK_RUNTIME - type_pointer = SWIG_ReturnGlobalTypeList((void *)0); -#else -# ifdef SWIGPY_USE_CAPSULE - type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0); -# else - type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, - (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); -# endif - if (PyErr_Occurred()) { - PyErr_Clear(); - type_pointer = (void *)0; - } -#endif - } - return (swig_module_info *) type_pointer; -} - -#if PY_MAJOR_VERSION < 2 -/* PyModule_AddObject function was introduced in Python 2.0. The following function - is copied out of Python/modsupport.c in python version 2.3.4 */ -SWIGINTERN int -PyModule_AddObject(PyObject *m, char *name, PyObject *o) -{ - PyObject *dict; - if (!PyModule_Check(m)) { - PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg"); - return SWIG_ERROR; - } - if (!o) { - PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value"); - return SWIG_ERROR; - } - - dict = PyModule_GetDict(m); - if (dict == NULL) { - /* Internal error -- modules must have a dict! */ - PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", - PyModule_GetName(m)); - return SWIG_ERROR; - } - if (PyDict_SetItemString(dict, name, o)) - return SWIG_ERROR; - Py_DECREF(o); - return SWIG_OK; -} -#endif - -SWIGRUNTIME void -#ifdef SWIGPY_USE_CAPSULE -SWIG_Python_DestroyModule(PyObject *obj) -#else -SWIG_Python_DestroyModule(void *vptr) -#endif -{ -#ifdef SWIGPY_USE_CAPSULE - swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME); -#else - swig_module_info *swig_module = (swig_module_info *) vptr; -#endif - swig_type_info **types = swig_module->types; - size_t i; - for (i =0; i < swig_module->size; ++i) { - swig_type_info *ty = types[i]; - if (ty->owndata) { - SwigPyClientData *data = (SwigPyClientData *) ty->clientdata; - if (data) SwigPyClientData_Del(data); - } - } - Py_DECREF(SWIG_This()); - swig_this = NULL; -} - -SWIGRUNTIME void -SWIG_Python_SetModule(swig_module_info *swig_module) { -#if PY_VERSION_HEX >= 0x03000000 - /* Add a dummy module object into sys.modules */ - PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION); -#else - static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ - PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table); -#endif -#ifdef SWIGPY_USE_CAPSULE - PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule); - if (pointer && module) { - PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer); - } else { - Py_XDECREF(pointer); - } -#else - PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); - if (pointer && module) { - PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); - } else { - Py_XDECREF(pointer); - } -#endif -} - -/* The python cached type query */ -SWIGRUNTIME PyObject * -SWIG_Python_TypeCache(void) { - static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); - return cache; -} - -SWIGRUNTIME swig_type_info * -SWIG_Python_TypeQuery(const char *type) -{ - PyObject *cache = SWIG_Python_TypeCache(); - PyObject *key = SWIG_Python_str_FromChar(type); - PyObject *obj = PyDict_GetItem(cache, key); - swig_type_info *descriptor; - if (obj) { -#ifdef SWIGPY_USE_CAPSULE - descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL); -#else - descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); -#endif - } else { - swig_module_info *swig_module = SWIG_GetModule(0); - descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); - if (descriptor) { -#ifdef SWIGPY_USE_CAPSULE - obj = PyCapsule_New((void*) descriptor, NULL, NULL); -#else - obj = PyCObject_FromVoidPtr(descriptor, NULL); -#endif - PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); - } - } - Py_DECREF(key); - return descriptor; -} - -/* - For backward compatibility only -*/ -#define SWIG_POINTER_EXCEPTION 0 -#define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) -#define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) - -SWIGRUNTIME int -SWIG_Python_AddErrMesg(const char* mesg, int in front) -{ - if (PyErr_Occurred()) { - PyObject *type = 0; - PyObject *value = 0; - PyObject *traceback = 0; - PyErr_Fetch(&type, &value, &traceback); - if (value) { - char *tmp; - PyObject *old_str = PyObject_Str(value); - Py_XINCREF(type); - PyErr_Clear(); - if (in front) { - PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str)); - } else { - PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg); - } - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(old_str); - } - return 1; - } else { - return 0; - } -} - -SWIGRUNTIME int -SWIG_Python_ArgFail(int argnum) -{ - if (PyErr_Occurred()) { - /* add information about failing argument */ - char mesg[256]; - PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); - return SWIG_Python_AddErrMesg(mesg, 1); - } else { - return 0; - } -} - -SWIGRUNTIMEINLINE const char * -SwigPyObject_GetDesc(PyObject *self) -{ - SwigPyObject *v = (SwigPyObject *)self; - swig_type_info *ty = v ? v->ty : 0; - return ty ? ty->str : ""; -} - -SWIGRUNTIME void -SWIG_Python_TypeError(const char *type, PyObject *obj) -{ - if (type) { -#if defined(SWIG_COBJECT_TYPES) - if (obj && SwigPyObject_Check(obj)) { - const char *otype = (const char *) SwigPyObject_GetDesc(obj); - if (otype) { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received", - type, otype); - return; - } - } else -#endif - { - const char *otype = (obj ? obj->ob_type->tp_name : 0); - if (otype) { - PyObject *str = PyObject_Str(obj); - const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0; - if (cstr) { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", - type, otype, cstr); - SWIG_Python_str_DelForPy3(cstr); - } else { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", - type, otype); - } - Py_XDECREF(str); - return; - } - } - PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); - } else { - PyErr_Format(PyExc_TypeError, "unexpected type is received"); - } -} - - -/* Convert a pointer value, signal an exception on a type mismatch */ -SWIGRUNTIME void * -SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) { - void *result; - if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { - PyErr_Clear(); -#if SWIG_POINTER_EXCEPTION - if (flags) { - SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); - SWIG_Python_ArgFail(argnum); - } -#endif - } - return result; -} - -#ifdef SWIGPYTHON_BUILTIN -SWIGRUNTIME int -SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) { - PyTypeObject *tp = obj->ob_type; - PyObject *descr; - PyObject *encoded_name; - descrsetfunc f; - int res = -1; - -# ifdef Py_USING_UNICODE - if (PyString_Check(name)) { - name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL); - if (!name) - return -1; - } else if (!PyUnicode_Check(name)) -# else - if (!PyString_Check(name)) -# endif - { - PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name); - return -1; - } else { - Py_INCREF(name); - } - - if (!tp->tp_dict) { - if (PyType_Ready(tp) < 0) - goto done; - } - - descr = _PyType_Lookup(tp, name); - f = NULL; - if (descr != NULL) - f = descr->ob_type->tp_descr_set; - if (!f) { - if (PyString_Check(name)) { - encoded_name = name; - Py_INCREF(name); - } else { - encoded_name = PyUnicode_AsUTF8String(name); - } - PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name)); - Py_DECREF(encoded_name); - } else { - res = f(descr, obj, value); - } - - done: - Py_DECREF(name); - return res; -} -#endif - - -#ifdef __cplusplus -} -#endif - - - -#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) - -#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else - - - -/* -------- TYPES TABLE (BEGIN) -------- */ - -#define SWIGTYPE_p_char swig_types[0] -#define SWIGTYPE_p_double swig_types[1] -#define SWIGTYPE_p_doubleArray swig_types[2] -#define SWIGTYPE_p_f_int_int_double__void swig_types[3] -#define SWIGTYPE_p_griddyn_status_enum swig_types[4] -#define SWIGTYPE_p_int swig_types[5] -#define SWIGTYPE_p_p_char swig_types[6] -#define SWIGTYPE_p_void swig_types[7] -static swig_type_info *swig_types[9]; -static swig_module_info swig_module = {swig_types, 8, 0, 0, 0, 0}; -#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) -#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) - -/* -------- TYPES TABLE (END) -------- */ - -#if (PY_VERSION_HEX <= 0x02000000) -# if !defined(SWIG_PYTHON_CLASSIC) -# error "This python version requires swig to be run with the '-classic' option" -# endif -#endif - -/*----------------------------------------------- - @(target):= _griddyn.so - ------------------------------------------------*/ -#if PY_VERSION_HEX >= 0x03000000 -# define SWIG_init PyInit__griddyn - -#else -# define SWIG_init init_griddyn - -#endif -#define SWIG_name "_griddyn" - -#define SWIGVERSION 0x030012 -#define SWIG_VERSION SWIGVERSION - - -#define SWIG_as_voidptr(a) (void *)((const void *)(a)) -#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) - - - static double *new_doublep() { - return (double *)calloc(1,sizeof(double)); - } - - static double *copy_doublep(double value) { - return (double *)memcpy((double *)calloc(1,sizeof(double)),&value,sizeof(double)); - } - - static void delete_doublep(double *obj) { - if (obj) free((char*)obj); - } - - static void doublep_assign(double *obj, double value) { - *obj = value; - } - - static double doublep_value(double *obj) { - return *obj; - } - - -SWIGINTERN int -SWIG_AsVal_double (PyObject *obj, double *val) -{ - int res = SWIG_TypeError; - if (PyFloat_Check(obj)) { - if (val) *val = PyFloat_AsDouble(obj); - return SWIG_OK; -#if PY_VERSION_HEX < 0x03000000 - } else if (PyInt_Check(obj)) { - if (val) *val = (double) PyInt_AsLong(obj); - return SWIG_OK; -#endif - } else if (PyLong_Check(obj)) { - double v = PyLong_AsDouble(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - double d = PyFloat_AsDouble(obj); - if (!PyErr_Occurred()) { - if (val) *val = d; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - long v = PyLong_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); - } else { - PyErr_Clear(); - } - } - } -#endif - return res; -} - - - #define SWIG_From_double PyFloat_FromDouble - - - static char *new_charp() { - return (char *)calloc(1,sizeof(char)); - } - - static char *copy_charp(char value) { - return (char *)memcpy((char *)calloc(1,sizeof(char)),&value,sizeof(char)); - } - - static void delete_charp(char *obj) { - if (obj) free((char*)obj); - } - - static void charp_assign(char *obj, char value) { - *obj = value; - } - - static char charp_value(char *obj) { - return *obj; - } - - -SWIGINTERN swig_type_info* -SWIG_pchar_descriptor(void) -{ - static int init = 0; - static swig_type_info* info = 0; - if (!init) { - info = SWIG_TypeQuery("_p_char"); - init = 1; - } - return info; -} - - -SWIGINTERNINLINE PyObject * -SWIG_FromCharPtrAndSize(const char* carray, size_t size) -{ - if (carray) { - if (size > INT_MAX) { - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); - return pchar_descriptor ? - SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void(); - } else { -#if PY_VERSION_HEX >= 0x03000000 -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - return PyBytes_FromStringAndSize(carray, (Py_ssize_t)(size)); -#else -#if PY_VERSION_HEX >= 0x03010000 - return PyUnicode_DecodeUTF8(carray, (Py_ssize_t)(size), "surrogateescape"); -#else - return PyUnicode_FromStringAndSize(carray, (Py_ssize_t)(size)); -#endif -#endif -#else - return PyString_FromStringAndSize(carray, (Py_ssize_t)(size)); -#endif - } - } else { - return SWIG_Py_Void(); - } -} - - -SWIGINTERNINLINE PyObject * -SWIG_FromCharPtr(const char *cptr) -{ - return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); -} - - -SWIGINTERN int -SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) -{ -#if PY_VERSION_HEX>=0x03000000 -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - if (PyBytes_Check(obj)) -#else - if (PyUnicode_Check(obj)) -#endif -#else - if (PyString_Check(obj)) -#endif - { - char *cstr; Py_ssize_t len; -#if PY_VERSION_HEX>=0x03000000 -#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - if (!alloc && cptr) { - /* We can't allow converting without allocation, since the internal - representation of string in Python 3 is UCS-2/UCS-4 but we require - a UTF-8 representation. - TODO(bhy) More detailed explanation */ - return SWIG_RuntimeError; - } - obj = PyUnicode_AsUTF8String(obj); - if(alloc) *alloc = SWIG_NEWOBJ; -#endif - PyBytes_AsStringAndSize(obj, &cstr, &len); -#else - PyString_AsStringAndSize(obj, &cstr, &len); -#endif - if (cptr) { - if (alloc) { - /* - In python the user should not be able to modify the inner - string representation. To warranty that, if you define - SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string - buffer is always returned. - - The default behavior is just to return the pointer value, - so, be careful. - */ -#if defined(SWIG_PYTHON_SAFE_CSTRINGS) - if (*alloc != SWIG_OLDOBJ) -#else - if (*alloc == SWIG_NEWOBJ) -#endif - { - *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); - *alloc = SWIG_NEWOBJ; - } else { - *cptr = cstr; - *alloc = SWIG_OLDOBJ; - } - } else { -#if PY_VERSION_HEX>=0x03000000 -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - *cptr = PyBytes_AsString(obj); -#else - assert(0); /* Should never reach here with Unicode strings in Python 3 */ -#endif -#else - *cptr = SWIG_Python_str_AsChar(obj); -#endif - } - } - if (psize) *psize = len + 1; -#if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR) - Py_XDECREF(obj); -#endif - return SWIG_OK; - } else { -#if defined(SWIG_PYTHON_2_UNICODE) -#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR) -#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once" -#endif -#if PY_VERSION_HEX<0x03000000 - if (PyUnicode_Check(obj)) { - char *cstr; Py_ssize_t len; - if (!alloc && cptr) { - return SWIG_RuntimeError; - } - obj = PyUnicode_AsUTF8String(obj); - if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) { - if (cptr) { - if (alloc) *alloc = SWIG_NEWOBJ; - *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); - } - if (psize) *psize = len + 1; - - Py_XDECREF(obj); - return SWIG_OK; - } else { - Py_XDECREF(obj); - } - } -#endif -#endif - - swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); - if (pchar_descriptor) { - void* vptr = 0; - if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { - if (cptr) *cptr = (char *) vptr; - if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; - if (alloc) *alloc = SWIG_OLDOBJ; - return SWIG_OK; - } - } - } - return SWIG_TypeError; -} - - -SWIGINTERN int -SWIG_AsCharArray(PyObject * obj, char *val, size_t size) -{ - char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ; - int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc); - if (SWIG_IsOK(res)) { - /* special case of single char conversion when we don't need space for NUL */ - if (size == 1 && csize == 2 && cptr && !cptr[1]) --csize; - if (csize <= size) { - if (val) { - if (csize) memcpy(val, cptr, csize*sizeof(char)); - if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char)); - } - if (alloc == SWIG_NEWOBJ) { - free((char*)cptr); - res = SWIG_DelNewMask(res); - } - return res; - } - if (alloc == SWIG_NEWOBJ) free((char*)cptr); - } - return SWIG_TypeError; -} - - -#include -#if !defined(SWIG_NO_LLONG_MAX) -# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) -# define LLONG_MAX __LONG_LONG_MAX__ -# define LLONG_MIN (-LLONG_MAX - 1LL) -# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) -# endif -#endif - - -#include - - -#include - - -SWIGINTERNINLINE int -SWIG_CanCastAsInteger(double *d, double min, double max) { - double x = *d; - if ((min <= x && x <= max)) { - double fx = floor(x); - double cx = ceil(x); - double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ - if ((errno == EDOM) || (errno == ERANGE)) { - errno = 0; - } else { - double summ, reps, diff; - if (rd < x) { - diff = x - rd; - } else if (rd > x) { - diff = rd - x; - } else { - return 1; - } - summ = rd + x; - reps = diff/summ; - if (reps < 8*DBL_EPSILON) { - *d = rd; - return 1; - } - } - } - return 0; -} - - -SWIGINTERN int -SWIG_AsVal_long (PyObject *obj, long* val) -{ -#if PY_VERSION_HEX < 0x03000000 - if (PyInt_Check(obj)) { - if (val) *val = PyInt_AsLong(obj); - return SWIG_OK; - } else -#endif - if (PyLong_Check(obj)) { - long v = PyLong_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - return SWIG_OverflowError; - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - long v = PyInt_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - double d; - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { - if (val) *val = (long)(d); - return res; - } - } - } -#endif - return SWIG_TypeError; -} - - -SWIGINTERN int -SWIG_AsVal_char (PyObject * obj, char *val) -{ - int res = SWIG_AsCharArray(obj, val, 1); - if (!SWIG_IsOK(res)) { - long v; - res = SWIG_AddCast(SWIG_AsVal_long (obj, &v)); - if (SWIG_IsOK(res)) { - if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) { - if (val) *val = (char)(v); - } else { - res = SWIG_OverflowError; - } - } - } - return res; -} - - - - - -SWIGINTERNINLINE PyObject * -SWIG_From_char (char c) -{ - return SWIG_FromCharPtrAndSize(&c,1); -} - - -typedef double doubleArray; - - -SWIGINTERN int -SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) -{ -#if PY_VERSION_HEX < 0x03000000 - if (PyInt_Check(obj)) { - long v = PyInt_AsLong(obj); - if (v >= 0) { - if (val) *val = v; - return SWIG_OK; - } else { - return SWIG_OverflowError; - } - } else -#endif - if (PyLong_Check(obj)) { - unsigned long v = PyLong_AsUnsignedLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - return SWIG_OverflowError; - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - unsigned long v = PyLong_AsUnsignedLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - double d; - int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { - if (val) *val = (unsigned long)(d); - return res; - } - } - } -#endif - return SWIG_TypeError; -} - - -#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE) -# define SWIG_LONG_LONG_AVAILABLE -#endif - - -#ifdef SWIG_LONG_LONG_AVAILABLE -SWIGINTERN int -SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val) -{ - int res = SWIG_TypeError; - if (PyLong_Check(obj)) { - unsigned long long v = PyLong_AsUnsignedLongLong(obj); - if (!PyErr_Occurred()) { - if (val) *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - res = SWIG_OverflowError; - } - } else { - unsigned long v; - res = SWIG_AsVal_unsigned_SS_long (obj,&v); - if (SWIG_IsOK(res)) { - if (val) *val = v; - return res; - } - } -#ifdef SWIG_PYTHON_CAST_MODE - { - const double mant_max = 1LL << DBL_MANT_DIG; - double d; - res = SWIG_AsVal_double (obj,&d); - if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max)) - return SWIG_OverflowError; - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) { - if (val) *val = (unsigned long long)(d); - return SWIG_AddCast(res); - } - res = SWIG_TypeError; - } -#endif - return res; -} -#endif - - -SWIGINTERNINLINE int -SWIG_AsVal_size_t (PyObject * obj, size_t *val) -{ - int res = SWIG_TypeError; -#ifdef SWIG_LONG_LONG_AVAILABLE - if (sizeof(size_t) <= sizeof(unsigned long)) { -#endif - unsigned long v; - res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = (size_t)(v); -#ifdef SWIG_LONG_LONG_AVAILABLE - } else if (sizeof(size_t) <= sizeof(unsigned long long)) { - unsigned long long v; - res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0); - if (SWIG_IsOK(res) && val) *val = (size_t)(v); - } -#endif - return res; -} - -SWIGINTERN doubleArray *new_doubleArray(size_t nelements){ - return (double *)calloc(nelements, sizeof(double)); - } -SWIGINTERN void delete_doubleArray(doubleArray *self){ - free((char*)self); - } -SWIGINTERN double doubleArray___getitem__(doubleArray *self,size_t index){ - return self[index]; - } -SWIGINTERN void doubleArray___setitem__(doubleArray *self,size_t index,double value){ - self[index] = value; - } -SWIGINTERN double *doubleArray_cast(doubleArray *self){ - return self; - } -SWIGINTERN doubleArray *doubleArray_frompointer(double *t){ - return (doubleArray *)(t); - } - -SWIGINTERN int -SWIG_AsVal_int (PyObject * obj, int *val) -{ - long v; - int res = SWIG_AsVal_long (obj, &v); - if (SWIG_IsOK(res)) { - if ((v < INT_MIN || v > INT_MAX)) { - return SWIG_OverflowError; - } else { - if (val) *val = (int)(v); - } - } - return res; -} - - -SWIGINTERNINLINE PyObject* - SWIG_From_int (int value) -{ - return PyInt_FromLong((long) value); -} - - -#include "griddyn_export.h" -#include "griddyn_export_advanced.h" - -#ifdef __cplusplus -extern "C" { -#endif -SWIGINTERN PyObject *_wrap_new_doublep(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - double *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":new_doublep")) SWIG_fail; - result = (double *)new_doublep(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_copy_doublep(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - double arg1 ; - double val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - double *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:copy_doublep",&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_double(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "copy_doublep" "', argument " "1"" of type '" "double""'"); - } - arg1 = (double)(val1); - result = (double *)copy_doublep(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_doublep(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - double *arg1 = (double *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_doublep",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_doublep" "', argument " "1"" of type '" "double *""'"); - } - arg1 = (double *)(argp1); - delete_doublep(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_doublep_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - double *arg1 = (double *) 0 ; - double arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:doublep_assign",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "doublep_assign" "', argument " "1"" of type '" "double *""'"); - } - arg1 = (double *)(argp1); - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "doublep_assign" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - doublep_assign(arg1,arg2); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_doublep_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - double *arg1 = (double *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"O:doublep_value",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "doublep_value" "', argument " "1"" of type '" "double *""'"); - } - arg1 = (double *)(argp1); - result = (double)doublep_value(arg1); - resultobj = SWIG_From_double((double)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_charp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)":new_charp")) SWIG_fail; - result = (char *)new_charp(); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_copy_charp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char arg1 ; - char val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - char *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:copy_charp",&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_char(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "copy_charp" "', argument " "1"" of type '" "char""'"); - } - arg1 = (char)(val1); - result = (char *)copy_charp(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_charp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_charp",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_charp" "', argument " "1"" of type '" "char *""'"); - } - arg1 = (char *)(buf1); - delete_charp(arg1); - resultobj = SWIG_Py_Void(); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return resultobj; -fail: - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_charp_assign(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - char arg2 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - char val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OO:charp_assign",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "charp_assign" "', argument " "1"" of type '" "char *""'"); - } - arg1 = (char *)(buf1); - ecode2 = SWIG_AsVal_char(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "charp_assign" "', argument " "2"" of type '" "char""'"); - } - arg2 = (char)(val2); - charp_assign(arg1,arg2); - resultobj = SWIG_Py_Void(); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return resultobj; -fail: - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_charp_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - PyObject * obj0 = 0 ; - char result; - - if (!PyArg_ParseTuple(args,(char *)"O:charp_value",&obj0)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "charp_value" "', argument " "1"" of type '" "char *""'"); - } - arg1 = (char *)(buf1); - result = (char)charp_value(arg1); - resultobj = SWIG_From_char((char)(result)); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return resultobj; -fail: - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_new_doubleArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - size_t arg1 ; - size_t val1 ; - int ecode1 = 0 ; - PyObject * obj0 = 0 ; - doubleArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:new_doubleArray",&obj0)) SWIG_fail; - ecode1 = SWIG_AsVal_size_t(obj0, &val1); - if (!SWIG_IsOK(ecode1)) { - SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_doubleArray" "', argument " "1"" of type '" "size_t""'"); - } - arg1 = (size_t)(val1); - result = (doubleArray *)new_doubleArray(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_doubleArray, SWIG_POINTER_NEW | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_delete_doubleArray(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - doubleArray *arg1 = (doubleArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:delete_doubleArray",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_doubleArray, SWIG_POINTER_DISOWN | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_doubleArray" "', argument " "1"" of type '" "doubleArray *""'"); - } - arg1 = (doubleArray *)(argp1); - delete_doubleArray(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_doubleArray___getitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - doubleArray *arg1 = (doubleArray *) 0 ; - size_t arg2 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"OO:doubleArray___getitem__",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_doubleArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "doubleArray___getitem__" "', argument " "1"" of type '" "doubleArray *""'"); - } - arg1 = (doubleArray *)(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "doubleArray___getitem__" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = (size_t)(val2); - result = (double)doubleArray___getitem__(arg1,arg2); - resultobj = SWIG_From_double((double)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_doubleArray___setitem__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - doubleArray *arg1 = (doubleArray *) 0 ; - size_t arg2 ; - double arg3 ; - void *argp1 = 0 ; - int res1 = 0 ; - size_t val2 ; - int ecode2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"OOO:doubleArray___setitem__",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_doubleArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "doubleArray___setitem__" "', argument " "1"" of type '" "doubleArray *""'"); - } - arg1 = (doubleArray *)(argp1); - ecode2 = SWIG_AsVal_size_t(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "doubleArray___setitem__" "', argument " "2"" of type '" "size_t""'"); - } - arg2 = (size_t)(val2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "doubleArray___setitem__" "', argument " "3"" of type '" "double""'"); - } - arg3 = (double)(val3); - doubleArray___setitem__(arg1,arg2,arg3); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_doubleArray_cast(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - doubleArray *arg1 = (doubleArray *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - double *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:doubleArray_cast",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_doubleArray, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "doubleArray_cast" "', argument " "1"" of type '" "doubleArray *""'"); - } - arg1 = (doubleArray *)(argp1); - result = (double *)doubleArray_cast(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_doubleArray_frompointer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - double *arg1 = (double *) 0 ; - void *argp1 = 0 ; - int res1 = 0 ; - PyObject * obj0 = 0 ; - doubleArray *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:doubleArray_frompointer",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "doubleArray_frompointer" "', argument " "1"" of type '" "double *""'"); - } - arg1 = (double *)(argp1); - result = (doubleArray *)doubleArray_frompointer(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_doubleArray, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *doubleArray_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *obj; - if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_doubleArray, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); -} - -SWIGINTERN PyObject *_wrap_gridDynSimulationGetResults__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - char *arg2 = (char *) 0 ; - double *arg3 ; - int arg4 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:gridDynSimulationGetResults",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationGetResults" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gridDynSimulationGetResults" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gridDynSimulationGetResults" "', argument " "3"" of type '" "double [0]""'"); - } - arg3 = (double *)(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gridDynSimulationGetResults" "', argument " "4"" of type '" "int""'"); - } - arg4 = (int)(val4); - result = (int)gridDynSimulationGetResults(arg1,(char const *)arg2,arg3,arg4); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - char *arg2 = (char *) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - GridDynObject result; - - if (!PyArg_ParseTuple(args,(char *)"OO:GridDynObjectCreate",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectCreate" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = (char *)(buf1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectCreate" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - result = (GridDynObject)GridDynObjectCreate((char const *)arg1,(char const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) (GridDynObject)0 ; - int res1 ; - PyObject * obj0 = 0 ; - GridDynObject result; - - if (!PyArg_ParseTuple(args,(char *)"O:GridDynObjectClone",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectClone" "', argument " "1"" of type '" "GridDynObject const""'"); - } - result = (GridDynObject)GridDynObjectClone(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) 0 ; - int res1 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:GridDynObjectFree",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectFree" "', argument " "1"" of type '" "GridDynObject""'"); - } - GridDynObjectFree(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) 0 ; - GridDynObject arg2 = (GridDynObject) 0 ; - int res1 ; - int res2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OO:GridDynObjectAdd",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectAdd" "', argument " "1"" of type '" "GridDynObject""'"); - } - res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectAdd" "', argument " "2"" of type '" "GridDynObject""'"); - } - result = (griddyn_status)GridDynObjectAdd(arg1,arg2); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_remove(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) 0 ; - GridDynObject arg2 = (GridDynObject) 0 ; - int res1 ; - int res2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OO:GridDynObjectRemove",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectRemove" "', argument " "1"" of type '" "GridDynObject""'"); - } - res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectRemove" "', argument " "2"" of type '" "GridDynObject""'"); - } - result = (griddyn_status)GridDynObjectRemove(arg1,arg2); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_setString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:GridDynObjectSetString",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectSetString" "', argument " "1"" of type '" "GridDynObject""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectSetString" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridDynObjectSetString" "', argument " "3"" of type '" "char const *""'"); - } - arg3 = (char *)(buf3); - result = (griddyn_status)GridDynObjectSetString(arg1,(char const *)arg2,(char const *)arg3); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_setValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) 0 ; - char *arg2 = (char *) 0 ; - double arg3 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:GridDynObjectSetValue",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectSetValue" "', argument " "1"" of type '" "GridDynObject""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectSetValue" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GridDynObjectSetValue" "', argument " "3"" of type '" "double""'"); - } - arg3 = (double)(val3); - result = (griddyn_status)GridDynObjectSetValue(arg1,(char const *)arg2,arg3); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_setValueUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) 0 ; - char *arg2 = (char *) 0 ; - double arg3 ; - char *arg4 = (char *) 0 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - double val3 ; - int ecode3 = 0 ; - int res4 ; - char *buf4 = 0 ; - int alloc4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:GridDynObjectSetValueUnits",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectSetValueUnits" "', argument " "1"" of type '" "GridDynObject""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectSetValueUnits" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GridDynObjectSetValueUnits" "', argument " "3"" of type '" "double""'"); - } - arg3 = (double)(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "GridDynObjectSetValueUnits" "', argument " "4"" of type '" "char const *""'"); - } - arg4 = (char *)(buf4); - result = (griddyn_status)GridDynObjectSetValueUnits(arg1,(char const *)arg2,arg3,(char const *)arg4); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_setFlag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) 0 ; - char *arg2 = (char *) 0 ; - int arg3 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:GridDynObjectSetFlag",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectSetFlag" "', argument " "1"" of type '" "GridDynObject""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectSetFlag" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GridDynObjectSetFlag" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - result = (griddyn_status)GridDynObjectSetFlag(arg1,(char const *)arg2,arg3); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_getString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) (GridDynObject)0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - int arg4 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int res3 ; - size_t size3 ; - char *buff3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:GridDynObjectGetString",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectGetString" "', argument " "1"" of type '" "GridDynObject const""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectGetString" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - res3 = SWIG_AsVal_size_t (obj2, &size3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridDynObjectGetString" "', argument " "3"" of type '" "(char *value, int N)""'"); - } - buff3= (char *)calloc(size3+1, sizeof(char)); - arg4 = (int)(size3); - arg3 = (char *)(buff3); - result = (griddyn_status)GridDynObjectGetString(arg1,(char const *)arg2,arg3,arg4); - resultobj = SWIG_From_int((int)(result)); - resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(arg3)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (buff3) free((char*)buff3); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (buff3) free((char*)buff3); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_getValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) (GridDynObject)0 ; - char *arg2 = (char *) 0 ; - double *arg3 = (double *) 0 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:GridDynObjectGetValue",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectGetValue" "', argument " "1"" of type '" "GridDynObject const""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectGetValue" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridDynObjectGetValue" "', argument " "3"" of type '" "double *""'"); - } - arg3 = (double *)(argp3); - result = (griddyn_status)GridDynObjectGetValue(arg1,(char const *)arg2,arg3); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_getValueUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) (GridDynObject)0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - double *arg4 = (double *) 0 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:GridDynObjectGetValueUnits",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectGetValueUnits" "', argument " "1"" of type '" "GridDynObject const""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectGetValueUnits" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridDynObjectGetValueUnits" "', argument " "3"" of type '" "char const *""'"); - } - arg3 = (char *)(buf3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "GridDynObjectGetValueUnits" "', argument " "4"" of type '" "double *""'"); - } - arg4 = (double *)(argp4); - result = (griddyn_status)GridDynObjectGetValueUnits(arg1,(char const *)arg2,(char const *)arg3,arg4); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_getFlag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) (GridDynObject)0 ; - char *arg2 = (char *) 0 ; - int *arg3 = (int *) 0 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:GridDynObjectGetFlag",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectGetFlag" "', argument " "1"" of type '" "GridDynObject const""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectGetFlag" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridDynObjectGetFlag" "', argument " "3"" of type '" "int *""'"); - } - arg3 = (int *)(argp3); - result = (griddyn_status)GridDynObjectGetFlag(arg1,(char const *)arg2,arg3); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_find(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) (GridDynObject)0 ; - char *arg2 = (char *) 0 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - GridDynObject result; - - if (!PyArg_ParseTuple(args,(char *)"OO:GridDynObjectFind",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectFind" "', argument " "1"" of type '" "GridDynObject const""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectFind" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - result = (GridDynObject)GridDynObjectFind(arg1,(char const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_getSubObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) (GridDynObject)0 ; - char *arg2 = (char *) 0 ; - int arg3 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - GridDynObject result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:GridDynObjectGetSubObject",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectGetSubObject" "', argument " "1"" of type '" "GridDynObject const""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectGetSubObject" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GridDynObjectGetSubObject" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - result = (GridDynObject)GridDynObjectGetSubObject(arg1,(char const *)arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_findByUserId(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) (GridDynObject)0 ; - char *arg2 = (char *) 0 ; - int arg3 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - GridDynObject result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:GridDynObjectFindByUserId",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectFindByUserId" "', argument " "1"" of type '" "GridDynObject const""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectFindByUserId" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GridDynObjectFindByUserId" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - result = (GridDynObject)GridDynObjectFindByUserId(arg1,(char const *)arg2,arg3); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_getParent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) (GridDynObject)0 ; - int res1 ; - PyObject * obj0 = 0 ; - GridDynObject result; - - if (!PyArg_ParseTuple(args,(char *)"O:GridDynObjectGetParent",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectGetParent" "', argument " "1"" of type '" "GridDynObject const""'"); - } - result = (GridDynObject)GridDynObjectGetParent(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_getType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) (GridDynObject)0 ; - int res1 ; - PyObject * obj0 = 0 ; - char *result = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:GridDynObjectGetType",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectGetType" "', argument " "1"" of type '" "GridDynObject const""'"); - } - result = (char *)GridDynObjectGetType(arg1); - resultobj = SWIG_FromCharPtr((const char *)result); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationCreate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - char *arg2 = (char *) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - GridDynSimulation result; - - if (!PyArg_ParseTuple(args,(char *)"OO:gridDynSimulationCreate",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationCreate" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = (char *)(buf1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gridDynSimulationCreate" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - result = (GridDynSimulation)gridDynSimulationCreate((char const *)arg1,(char const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationFree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - int res1 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:gridDynSimulationFree",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationFree" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - gridDynSimulationFree(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationInitializeFromString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - char *arg2 = (char *) 0 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OO:gridDynSimulationInitializeFromString",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationInitializeFromString" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gridDynSimulationInitializeFromString" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - result = (griddyn_status)gridDynSimulationInitializeFromString(arg1,(char const *)arg2); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationInitializeFromArgs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - int arg2 ; - char **arg3 ; - int arg4 ; - int res1 ; - int val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:gridDynSimulationInitializeFromArgs",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationInitializeFromArgs" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gridDynSimulationInitializeFromArgs" "', argument " "2"" of type '" "int""'"); - } - arg2 = (int)(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_p_char, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gridDynSimulationInitializeFromArgs" "', argument " "3"" of type '" "char *[]""'"); - } - arg3 = (char **)(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gridDynSimulationInitializeFromArgs" "', argument " "4"" of type '" "int""'"); - } - arg4 = (int)(val4); - result = (griddyn_status)gridDynSimulationInitializeFromArgs(arg1,arg2,arg3,arg4); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationLoadfile(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:gridDynSimulationLoadfile",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationLoadfile" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gridDynSimulationLoadfile" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gridDynSimulationLoadfile" "', argument " "3"" of type '" "char const *""'"); - } - arg3 = (char *)(buf3); - result = (griddyn_status)gridDynSimulationLoadfile(arg1,(char const *)arg2,(char const *)arg3); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationAddCommand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - char *arg2 = (char *) 0 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OO:gridDynSimulationAddCommand",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationAddCommand" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gridDynSimulationAddCommand" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - result = (griddyn_status)gridDynSimulationAddCommand(arg1,(char const *)arg2); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationPowerflowInitialize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - int res1 ; - PyObject * obj0 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"O:gridDynSimulationPowerflowInitialize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationPowerflowInitialize" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - result = (griddyn_status)gridDynSimulationPowerflowInitialize(arg1); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationPowerflow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - int res1 ; - PyObject * obj0 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"O:gridDynSimulationPowerflow",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationPowerflow" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - result = (griddyn_status)gridDynSimulationPowerflow(arg1); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationDynamicInitialize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - int res1 ; - PyObject * obj0 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"O:gridDynSimulationDynamicInitialize",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationDynamicInitialize" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - result = (griddyn_status)gridDynSimulationDynamicInitialize(arg1); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationReset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - int res1 ; - PyObject * obj0 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"O:gridDynSimulationReset",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationReset" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - result = (griddyn_status)gridDynSimulationReset(arg1); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationGetCurrentTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - int res1 ; - PyObject * obj0 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"O:gridDynSimulationGetCurrentTime",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationGetCurrentTime" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - result = (double)gridDynSimulationGetCurrentTime(arg1); - resultobj = SWIG_From_double((double)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationRun(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - int res1 ; - PyObject * obj0 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"O:gridDynSimulationRun",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationRun" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - result = (griddyn_status)gridDynSimulationRun(arg1); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationRunTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - double arg2 ; - int res1 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OO:gridDynSimulationRunTo",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationRunTo" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gridDynSimulationRunTo" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - result = (griddyn_status)gridDynSimulationRunTo(arg1,arg2); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationStep(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - int res1 ; - PyObject * obj0 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"O:gridDynSimulationStep",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationStep" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - result = (griddyn_status)gridDynSimulationStep(arg1); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationRunAsync(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - int res1 ; - PyObject * obj0 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"O:gridDynSimulationRunAsync",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationRunAsync" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - result = (griddyn_status)gridDynSimulationRunAsync(arg1); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationRunToAsync(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - double arg2 ; - int res1 ; - double val2 ; - int ecode2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OO:gridDynSimulationRunToAsync",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationRunToAsync" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gridDynSimulationRunToAsync" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - result = (griddyn_status)gridDynSimulationRunToAsync(arg1,arg2); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationStepAsync(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - int res1 ; - PyObject * obj0 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"O:gridDynSimulationStepAsync",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationStepAsync" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - result = (griddyn_status)gridDynSimulationStepAsync(arg1); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationGetStatus(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - int res1 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:gridDynSimulationGetStatus",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationGetStatus" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - result = (int)gridDynSimulationGetStatus(arg1); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_getSimulationObject(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - int res1 ; - PyObject * obj0 = 0 ; - GridDynObject result; - - if (!PyArg_ParseTuple(args,(char *)"O:getSimulationObject",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getSimulationObject" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - result = (GridDynObject)getSimulationObject(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationGetSolverKey(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - char *arg2 = (char *) 0 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - SolverKey result; - - if (!PyArg_ParseTuple(args,(char *)"OO:gridDynSimulationGetSolverKey",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationGetSolverKey" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gridDynSimulationGetSolverKey" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - result = (SolverKey)gridDynSimulationGetSolverKey(arg1,(char const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSolverKeyFree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - SolverKey arg1 = (SolverKey) 0 ; - int res1 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:gridDynSolverKeyFree",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSolverKeyFree" "', argument " "1"" of type '" "SolverKey""'"); - } - gridDynSolverKeyFree(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationStateSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - SolverKey arg2 = (SolverKey) 0 ; - int res1 ; - int res2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"OO:gridDynSimulationStateSize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationStateSize" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gridDynSimulationStateSize" "', argument " "2"" of type '" "SolverKey""'"); - } - result = (int)gridDynSimulationStateSize(arg1,arg2); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationBusCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - int res1 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:gridDynSimulationBusCount",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationBusCount" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - result = (int)gridDynSimulationBusCount(arg1); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationLineCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - int res1 ; - PyObject * obj0 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"O:gridDynSimulationLineCount",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationLineCount" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - result = (int)gridDynSimulationLineCount(arg1); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationGetResults__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - char *arg2 = (char *) 0 ; - double *arg3 = (double *) 0 ; - int arg4 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - int val4 ; - int ecode4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - int result; - - if (!PyArg_ParseTuple(args,(char *)"OOOO:gridDynSimulationGetResults",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationGetResults" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gridDynSimulationGetResults" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gridDynSimulationGetResults" "', argument " "3"" of type '" "double *""'"); - } - arg3 = (double *)(argp3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "gridDynSimulationGetResults" "', argument " "4"" of type '" "int""'"); - } - arg4 = (int)(val4); - result = (int)gridDynSimulationGetResults(arg1,(char const *)arg2,arg3,arg4); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationGetResults(PyObject *self, PyObject *args) { - Py_ssize_t argc; - PyObject *argv[5] = { - 0 - }; - Py_ssize_t ii; - - if (!PyTuple_Check(args)) SWIG_fail; - argc = args ? PyObject_Length(args) : 0; - for (ii = 0; (ii < 4) && (ii < argc); ii++) { - argv[ii] = PyTuple_GET_ITEM(args,ii); - } - if (argc == 4) { - int _v; - void *ptr = 0; - int res = SWIG_ConvertPtr(argv[0], &ptr, 0, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_gridDynSimulationGetResults__SWIG_0(self, args); - } - } - } - } - } - if (argc == 4) { - int _v; - void *ptr = 0; - int res = SWIG_ConvertPtr(argv[0], &ptr, 0, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_double, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_gridDynSimulationGetResults__SWIG_1(self, args); - } - } - } - } - } - -fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'gridDynSimulationGetResults'.\n" - " Possible C/C++ prototypes are:\n" - " gridDynSimulationGetResults(GridDynSimulation,char const *,double [0],int)\n" - " gridDynSimulationGetResults(GridDynSimulation,char const *,double *,int)\n"); - return 0; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationGuessState(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - double arg2 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - SolverKey arg5 = (SolverKey) 0 ; - int res1 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - int res5 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:gridDynSimulationGuessState",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationGuessState" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gridDynSimulationGuessState" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gridDynSimulationGuessState" "', argument " "3"" of type '" "double *""'"); - } - arg3 = (double *)(argp3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "gridDynSimulationGuessState" "', argument " "4"" of type '" "double *""'"); - } - arg4 = (double *)(argp4); - res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "gridDynSimulationGuessState" "', argument " "5"" of type '" "SolverKey""'"); - } - result = (griddyn_status)gridDynSimulationGuessState(arg1,arg2,arg3,arg4,arg5); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationSetState(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - double arg2 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - SolverKey arg5 = (SolverKey) 0 ; - int res1 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - int res5 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:gridDynSimulationSetState",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationSetState" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gridDynSimulationSetState" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gridDynSimulationSetState" "', argument " "3"" of type '" "double const *""'"); - } - arg3 = (double *)(argp3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "gridDynSimulationSetState" "', argument " "4"" of type '" "double const *""'"); - } - arg4 = (double *)(argp4); - res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "gridDynSimulationSetState" "', argument " "5"" of type '" "SolverKey""'"); - } - result = (griddyn_status)gridDynSimulationSetState(arg1,arg2,(double const *)arg3,(double const *)arg4,arg5); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationGetStateVariableTypes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - double *arg2 = (double *) 0 ; - SolverKey arg3 = (SolverKey) 0 ; - int res1 ; - void *argp2 = 0 ; - int res2 = 0 ; - int res3 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:gridDynSimulationGetStateVariableTypes",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationGetStateVariableTypes" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "gridDynSimulationGetStateVariableTypes" "', argument " "2"" of type '" "double *""'"); - } - arg2 = (double *)(argp2); - res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gridDynSimulationGetStateVariableTypes" "', argument " "3"" of type '" "SolverKey""'"); - } - result = (griddyn_status)gridDynSimulationGetStateVariableTypes(arg1,arg2,arg3); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationResidual(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - double arg2 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double *arg5 = (double *) 0 ; - SolverKey arg6 = (SolverKey) 0 ; - int res1 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - void *argp5 = 0 ; - int res5 = 0 ; - int res6 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:gridDynSimulationResidual",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationResidual" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gridDynSimulationResidual" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gridDynSimulationResidual" "', argument " "3"" of type '" "double *""'"); - } - arg3 = (double *)(argp3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "gridDynSimulationResidual" "', argument " "4"" of type '" "double const *""'"); - } - arg4 = (double *)(argp4); - res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "gridDynSimulationResidual" "', argument " "5"" of type '" "double const *""'"); - } - arg5 = (double *)(argp5); - res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "gridDynSimulationResidual" "', argument " "6"" of type '" "SolverKey""'"); - } - result = (griddyn_status)gridDynSimulationResidual(arg1,arg2,arg3,(double const *)arg4,(double const *)arg5,arg6); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationDerivative(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - double arg2 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - SolverKey arg5 = (SolverKey) 0 ; - int res1 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - int res5 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:gridDynSimulationDerivative",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationDerivative" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gridDynSimulationDerivative" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gridDynSimulationDerivative" "', argument " "3"" of type '" "double *""'"); - } - arg3 = (double *)(argp3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "gridDynSimulationDerivative" "', argument " "4"" of type '" "double const *""'"); - } - arg4 = (double *)(argp4); - res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "gridDynSimulationDerivative" "', argument " "5"" of type '" "SolverKey""'"); - } - result = (griddyn_status)gridDynSimulationDerivative(arg1,arg2,arg3,(double const *)arg4,arg5); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationAlgebraicUpdate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - double arg2 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double arg5 ; - SolverKey arg6 = (SolverKey) 0 ; - int res1 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - double val5 ; - int ecode5 = 0 ; - int res6 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:gridDynSimulationAlgebraicUpdate",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationAlgebraicUpdate" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gridDynSimulationAlgebraicUpdate" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gridDynSimulationAlgebraicUpdate" "', argument " "3"" of type '" "double *""'"); - } - arg3 = (double *)(argp3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "gridDynSimulationAlgebraicUpdate" "', argument " "4"" of type '" "double const *""'"); - } - arg4 = (double *)(argp4); - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "gridDynSimulationAlgebraicUpdate" "', argument " "5"" of type '" "double""'"); - } - arg5 = (double)(val5); - res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "gridDynSimulationAlgebraicUpdate" "', argument " "6"" of type '" "SolverKey""'"); - } - result = (griddyn_status)gridDynSimulationAlgebraicUpdate(arg1,arg2,arg3,(double const *)arg4,arg5,arg6); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_gridDynSimulationJacobian(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSimulation arg1 = (GridDynSimulation) 0 ; - double arg2 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - double arg5 ; - SolverKey arg6 = (SolverKey) 0 ; - void (*arg7)(int,int,double) = (void (*)(int,int,double)) 0 ; - int res1 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - double val5 ; - int ecode5 = 0 ; - int res6 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - PyObject * obj6 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:gridDynSimulationJacobian",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "gridDynSimulationJacobian" "', argument " "1"" of type '" "GridDynSimulation""'"); - } - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "gridDynSimulationJacobian" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "gridDynSimulationJacobian" "', argument " "3"" of type '" "double const *""'"); - } - arg3 = (double *)(argp3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "gridDynSimulationJacobian" "', argument " "4"" of type '" "double const *""'"); - } - arg4 = (double *)(argp4); - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "gridDynSimulationJacobian" "', argument " "5"" of type '" "double""'"); - } - arg5 = (double)(val5); - res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "gridDynSimulationJacobian" "', argument " "6"" of type '" "SolverKey""'"); - } - { - int res = SWIG_ConvertFunctionPtr(obj6, (void**)(&arg7), SWIGTYPE_p_f_int_int_double__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "gridDynSimulationJacobian" "', argument " "7"" of type '" "void (*)(int,int,double)""'"); - } - } - result = (griddyn_status)gridDynSimulationJacobian(arg1,arg2,(double const *)arg3,(double const *)arg4,arg5,arg6,arg7); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynSingleQuery_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) 0 ; - char *arg2 = (char *) 0 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - GridDynSingleQuery result; - - if (!PyArg_ParseTuple(args,(char *)"OO:GridDynSingleQueryCreate",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynSingleQueryCreate" "', argument " "1"" of type '" "GridDynObject""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynSingleQueryCreate" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - result = (GridDynSingleQuery)GridDynSingleQueryCreate(arg1,(char const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynVectorQuery_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) 0 ; - char *arg2 = (char *) 0 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - GridDynVectorQuery result; - - if (!PyArg_ParseTuple(args,(char *)"OO:GridDynVectorQueryCreate",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynVectorQueryCreate" "', argument " "1"" of type '" "GridDynObject""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynVectorQueryCreate" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - result = (GridDynVectorQuery)GridDynVectorQueryCreate(arg1,(char const *)arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynSingleQuery_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSingleQuery arg1 = (GridDynSingleQuery) 0 ; - int res1 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:GridDynSingleQueryFree",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynSingleQueryFree" "', argument " "1"" of type '" "GridDynSingleQuery""'"); - } - GridDynSingleQueryFree(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynVectorQuery_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynVectorQuery arg1 = (GridDynVectorQuery) 0 ; - int res1 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:GridDynVectorQueryFree",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynVectorQueryFree" "', argument " "1"" of type '" "GridDynVectorQuery""'"); - } - GridDynVectorQueryFree(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynSingleQuery_run(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSingleQuery arg1 = (GridDynSingleQuery) 0 ; - int res1 ; - PyObject * obj0 = 0 ; - double result; - - if (!PyArg_ParseTuple(args,(char *)"O:GridDynSingleQueryRun",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynSingleQueryRun" "', argument " "1"" of type '" "GridDynSingleQuery""'"); - } - result = (double)GridDynSingleQueryRun(arg1); - resultobj = SWIG_From_double((double)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynVectorQuery_run(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynVectorQuery arg1 = (GridDynVectorQuery) 0 ; - double *arg2 = (double *) 0 ; - int arg3 ; - int res1 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:GridDynVectorQueryRun",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynVectorQueryRun" "', argument " "1"" of type '" "GridDynVectorQuery""'"); - } - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynVectorQueryRun" "', argument " "2"" of type '" "double *""'"); - } - arg2 = (double *)(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GridDynVectorQueryRun" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - result = (griddyn_status)GridDynVectorQueryRun(arg1,arg2,arg3); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynVectorQuery_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynVectorQuery arg1 = (GridDynVectorQuery) 0 ; - GridDynObject arg2 = (GridDynObject) 0 ; - char *arg3 = (char *) 0 ; - int res1 ; - int res2 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:GridDynVectorQueryAppend",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynVectorQueryAppend" "', argument " "1"" of type '" "GridDynVectorQuery""'"); - } - res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynVectorQueryAppend" "', argument " "2"" of type '" "GridDynObject""'"); - } - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridDynVectorQueryAppend" "', argument " "3"" of type '" "char const *""'"); - } - arg3 = (char *)(buf3); - result = (griddyn_status)GridDynVectorQueryAppend(arg1,arg2,(char const *)arg3); - resultobj = SWIG_From_int((int)(result)); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return resultobj; -fail: - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynSingleQuery_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynSingleQuery arg1 = (GridDynSingleQuery) 0 ; - GridDynObject arg2 = (GridDynObject) 0 ; - char *arg3 = (char *) 0 ; - int res1 ; - int res2 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:GridDynSingleQueryUpdate",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynSingleQueryUpdate" "', argument " "1"" of type '" "GridDynSingleQuery""'"); - } - res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynSingleQueryUpdate" "', argument " "2"" of type '" "GridDynObject""'"); - } - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridDynSingleQueryUpdate" "', argument " "3"" of type '" "char const *""'"); - } - arg3 = (char *)(buf3); - result = (griddyn_status)GridDynSingleQueryUpdate(arg1,arg2,(char const *)arg3); - resultobj = SWIG_From_int((int)(result)); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return resultobj; -fail: - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynVectorQuery_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynVectorQuery arg1 = (GridDynVectorQuery) 0 ; - GridDynObject arg2 = (GridDynObject) 0 ; - char *arg3 = (char *) 0 ; - int res1 ; - int res2 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:GridDynVectorQueryUpdate",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynVectorQueryUpdate" "', argument " "1"" of type '" "GridDynVectorQuery""'"); - } - res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynVectorQueryUpdate" "', argument " "2"" of type '" "GridDynObject""'"); - } - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridDynVectorQueryUpdate" "', argument " "3"" of type '" "char const *""'"); - } - arg3 = (char *)(buf3); - result = (griddyn_status)GridDynVectorQueryUpdate(arg1,arg2,(char const *)arg3); - resultobj = SWIG_From_int((int)(result)); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return resultobj; -fail: - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynEvent_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; - GridDynObject arg2 = (GridDynObject) 0 ; - int res1 ; - char *buf1 = 0 ; - int alloc1 = 0 ; - int res2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - GridDynEvent result; - - if (!PyArg_ParseTuple(args,(char *)"OO:GridDynEventCreate",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynEventCreate" "', argument " "1"" of type '" "char const *""'"); - } - arg1 = (char *)(buf1); - res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynEventCreate" "', argument " "2"" of type '" "GridDynObject""'"); - } - result = (GridDynEvent)GridDynEventCreate((char const *)arg1,arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return resultobj; -fail: - if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynEvent_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynEvent arg1 = (GridDynEvent) 0 ; - int res1 ; - PyObject * obj0 = 0 ; - - if (!PyArg_ParseTuple(args,(char *)"O:GridDynEventFree",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynEventFree" "', argument " "1"" of type '" "GridDynEvent""'"); - } - GridDynEventFree(arg1); - resultobj = SWIG_Py_Void(); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynEvent_trigger(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynEvent arg1 = (GridDynEvent) 0 ; - int res1 ; - PyObject * obj0 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"O:GridDynEventTrigger",&obj0)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynEventTrigger" "', argument " "1"" of type '" "GridDynEvent""'"); - } - result = (griddyn_status)GridDynEventTrigger(arg1); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynEvent_schedule(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynEvent arg1 = (GridDynEvent) 0 ; - GridDynSimulation arg2 = (GridDynSimulation) 0 ; - int res1 ; - int res2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OO:GridDynEventSchedule",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynEventSchedule" "', argument " "1"" of type '" "GridDynEvent""'"); - } - res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynEventSchedule" "', argument " "2"" of type '" "GridDynSimulation""'"); - } - result = (griddyn_status)GridDynEventSchedule(arg1,arg2); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynEvent_setValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynEvent arg1 = (GridDynEvent) 0 ; - char *arg2 = (char *) 0 ; - double arg3 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - double val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:GridDynEventSetValue",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynEventSetValue" "', argument " "1"" of type '" "GridDynEvent""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynEventSetValue" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - ecode3 = SWIG_AsVal_double(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GridDynEventSetValue" "', argument " "3"" of type '" "double""'"); - } - arg3 = (double)(val3); - result = (griddyn_status)GridDynEventSetValue(arg1,(char const *)arg2,arg3); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynEvent_setString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynEvent arg1 = (GridDynEvent) 0 ; - char *arg2 = (char *) 0 ; - char *arg3 = (char *) 0 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int res3 ; - char *buf3 = 0 ; - int alloc3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:GridDynEventSetString",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynEventSetString" "', argument " "1"" of type '" "GridDynEvent""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynEventSetString" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridDynEventSetString" "', argument " "3"" of type '" "char const *""'"); - } - arg3 = (char *)(buf3); - result = (griddyn_status)GridDynEventSetString(arg1,(char const *)arg2,(char const *)arg3); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynEvent_setFlag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynEvent arg1 = (GridDynEvent) 0 ; - char *arg2 = (char *) 0 ; - int arg3 ; - int res1 ; - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; - int val3 ; - int ecode3 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:GridDynEventSetFlag",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynEventSetFlag" "', argument " "1"" of type '" "GridDynEvent""'"); - } - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynEventSetFlag" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GridDynEventSetFlag" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - result = (griddyn_status)GridDynEventSetFlag(arg1,(char const *)arg2,arg3); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return resultobj; -fail: - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynEvent_setTarget(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynEvent arg1 = (GridDynEvent) 0 ; - GridDynObject arg2 = (GridDynObject) 0 ; - int res1 ; - int res2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OO:GridDynEventSetTarget",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynEventSetTarget" "', argument " "1"" of type '" "GridDynEvent""'"); - } - res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynEventSetTarget" "', argument " "2"" of type '" "GridDynObject""'"); - } - result = (griddyn_status)GridDynEventSetTarget(arg1,arg2); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_stateSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) 0 ; - SolverKey arg2 = (SolverKey) 0 ; - int res1 ; - int res2 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OO:GridDynObjectStateSize",&obj0,&obj1)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectStateSize" "', argument " "1"" of type '" "GridDynObject""'"); - } - res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectStateSize" "', argument " "2"" of type '" "SolverKey""'"); - } - result = (griddyn_status)GridDynObjectStateSize(arg1,arg2); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_guessState(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) 0 ; - double arg2 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - SolverKey arg5 = (SolverKey) 0 ; - int res1 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - int res5 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:GridDynObjectGuessState",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectGuessState" "', argument " "1"" of type '" "GridDynObject""'"); - } - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridDynObjectGuessState" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridDynObjectGuessState" "', argument " "3"" of type '" "double *""'"); - } - arg3 = (double *)(argp3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "GridDynObjectGuessState" "', argument " "4"" of type '" "double *""'"); - } - arg4 = (double *)(argp4); - res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "GridDynObjectGuessState" "', argument " "5"" of type '" "SolverKey""'"); - } - result = (griddyn_status)GridDynObjectGuessState(arg1,arg2,arg3,arg4,arg5); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_setState(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) 0 ; - double arg2 ; - double *arg3 = (double *) 0 ; - double *arg4 = (double *) 0 ; - SolverKey arg5 = (SolverKey) 0 ; - int res1 ; - double val2 ; - int ecode2 = 0 ; - void *argp3 = 0 ; - int res3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - int res5 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:GridDynObjectSetState",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectSetState" "', argument " "1"" of type '" "GridDynObject""'"); - } - ecode2 = SWIG_AsVal_double(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GridDynObjectSetState" "', argument " "2"" of type '" "double""'"); - } - arg2 = (double)(val2); - res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridDynObjectSetState" "', argument " "3"" of type '" "double const *""'"); - } - arg3 = (double *)(argp3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "GridDynObjectSetState" "', argument " "4"" of type '" "double const *""'"); - } - arg4 = (double *)(argp4); - res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "GridDynObjectSetState" "', argument " "5"" of type '" "SolverKey""'"); - } - result = (griddyn_status)GridDynObjectSetState(arg1,arg2,(double const *)arg3,(double const *)arg4,arg5); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_getStateVariableTypes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) 0 ; - double *arg2 = (double *) 0 ; - SolverKey arg3 = (SolverKey) 0 ; - int res1 ; - void *argp2 = 0 ; - int res2 = 0 ; - int res3 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOO:GridDynObjectGetStateVariableTypes",&obj0,&obj1,&obj2)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectGetStateVariableTypes" "', argument " "1"" of type '" "GridDynObject""'"); - } - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectGetStateVariableTypes" "', argument " "2"" of type '" "double *""'"); - } - arg2 = (double *)(argp2); - res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GridDynObjectGetStateVariableTypes" "', argument " "3"" of type '" "SolverKey""'"); - } - result = (griddyn_status)GridDynObjectGetStateVariableTypes(arg1,arg2,arg3); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_residual(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) 0 ; - double *arg2 = (double *) 0 ; - int arg3 ; - double *arg4 = (double *) 0 ; - SolverKey arg5 = (SolverKey) 0 ; - int res1 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - int res5 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:GridDynObjectResidual",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectResidual" "', argument " "1"" of type '" "GridDynObject""'"); - } - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectResidual" "', argument " "2"" of type '" "double const *""'"); - } - arg2 = (double *)(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GridDynObjectResidual" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "GridDynObjectResidual" "', argument " "4"" of type '" "double *""'"); - } - arg4 = (double *)(argp4); - res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "GridDynObjectResidual" "', argument " "5"" of type '" "SolverKey""'"); - } - result = (griddyn_status)GridDynObjectResidual(arg1,(double const *)arg2,arg3,arg4,arg5); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_derivative(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) 0 ; - double *arg2 = (double *) 0 ; - int arg3 ; - double *arg4 = (double *) 0 ; - SolverKey arg5 = (SolverKey) 0 ; - int res1 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - int res5 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:GridDynObjectDerivative",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectDerivative" "', argument " "1"" of type '" "GridDynObject""'"); - } - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectDerivative" "', argument " "2"" of type '" "double const *""'"); - } - arg2 = (double *)(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GridDynObjectDerivative" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "GridDynObjectDerivative" "', argument " "4"" of type '" "double *""'"); - } - arg4 = (double *)(argp4); - res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "GridDynObjectDerivative" "', argument " "5"" of type '" "SolverKey""'"); - } - result = (griddyn_status)GridDynObjectDerivative(arg1,(double const *)arg2,arg3,arg4,arg5); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_algebraicUpdate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) 0 ; - double *arg2 = (double *) 0 ; - int arg3 ; - double *arg4 = (double *) 0 ; - double arg5 ; - SolverKey arg6 = (SolverKey) 0 ; - int res1 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - void *argp4 = 0 ; - int res4 = 0 ; - double val5 ; - int ecode5 = 0 ; - int res6 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:GridDynObjectAlgebraicUpdate",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectAlgebraicUpdate" "', argument " "1"" of type '" "GridDynObject""'"); - } - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectAlgebraicUpdate" "', argument " "2"" of type '" "double const *""'"); - } - arg2 = (double *)(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GridDynObjectAlgebraicUpdate" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "GridDynObjectAlgebraicUpdate" "', argument " "4"" of type '" "double *""'"); - } - arg4 = (double *)(argp4); - ecode5 = SWIG_AsVal_double(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "GridDynObjectAlgebraicUpdate" "', argument " "5"" of type '" "double""'"); - } - arg5 = (double)(val5); - res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "GridDynObjectAlgebraicUpdate" "', argument " "6"" of type '" "SolverKey""'"); - } - result = (griddyn_status)GridDynObjectAlgebraicUpdate(arg1,(double const *)arg2,arg3,arg4,arg5,arg6); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_jacobian(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) 0 ; - double *arg2 = (double *) 0 ; - int arg3 ; - double arg4 ; - void (*arg5)(int,int,double) = (void (*)(int,int,double)) 0 ; - SolverKey arg6 = (SolverKey) 0 ; - int res1 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - double val4 ; - int ecode4 = 0 ; - int res6 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - PyObject * obj5 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOOOOO:GridDynObjectJacobian",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectJacobian" "', argument " "1"" of type '" "GridDynObject""'"); - } - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectJacobian" "', argument " "2"" of type '" "double const *""'"); - } - arg2 = (double *)(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GridDynObjectJacobian" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - ecode4 = SWIG_AsVal_double(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GridDynObjectJacobian" "', argument " "4"" of type '" "double""'"); - } - arg4 = (double)(val4); - { - int res = SWIG_ConvertFunctionPtr(obj4, (void**)(&arg5), SWIGTYPE_p_f_int_int_double__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "GridDynObjectJacobian" "', argument " "5"" of type '" "void (*)(int,int,double)""'"); - } - } - res6 = SWIG_ConvertPtr(obj5,SWIG_as_voidptrptr(&arg6), 0, 0); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "GridDynObjectJacobian" "', argument " "6"" of type '" "SolverKey""'"); - } - result = (griddyn_status)GridDynObjectJacobian(arg1,(double const *)arg2,arg3,arg4,arg5,arg6); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_ioPartialDerivatives(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) 0 ; - double *arg2 = (double *) 0 ; - int arg3 ; - void (*arg4)(int,int,double) = (void (*)(int,int,double)) 0 ; - SolverKey arg5 = (SolverKey) 0 ; - int res1 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int res5 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:GridDynObjectIoPartialDerivatives",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectIoPartialDerivatives" "', argument " "1"" of type '" "GridDynObject""'"); - } - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectIoPartialDerivatives" "', argument " "2"" of type '" "double const *""'"); - } - arg2 = (double *)(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GridDynObjectIoPartialDerivatives" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - { - int res = SWIG_ConvertFunctionPtr(obj3, (void**)(&arg4), SWIGTYPE_p_f_int_int_double__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "GridDynObjectIoPartialDerivatives" "', argument " "4"" of type '" "void (*)(int,int,double)""'"); - } - } - res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "GridDynObjectIoPartialDerivatives" "', argument " "5"" of type '" "SolverKey""'"); - } - result = (griddyn_status)GridDynObjectIoPartialDerivatives(arg1,(double const *)arg2,arg3,arg4,arg5); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -SWIGINTERN PyObject *_wrap_GridDynObject_outputPartialDerivatives(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - GridDynObject arg1 = (GridDynObject) 0 ; - double *arg2 = (double *) 0 ; - int arg3 ; - void (*arg4)(int,int,double) = (void (*)(int,int,double)) 0 ; - SolverKey arg5 = (SolverKey) 0 ; - int res1 ; - void *argp2 = 0 ; - int res2 = 0 ; - int val3 ; - int ecode3 = 0 ; - int res5 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; - PyObject * obj3 = 0 ; - PyObject * obj4 = 0 ; - griddyn_status result; - - if (!PyArg_ParseTuple(args,(char *)"OOOOO:GridDynObjectOutputPartialDerivatives",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; - res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GridDynObjectOutputPartialDerivatives" "', argument " "1"" of type '" "GridDynObject""'"); - } - res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 | 0 ); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GridDynObjectOutputPartialDerivatives" "', argument " "2"" of type '" "double const *""'"); - } - arg2 = (double *)(argp2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GridDynObjectOutputPartialDerivatives" "', argument " "3"" of type '" "int""'"); - } - arg3 = (int)(val3); - { - int res = SWIG_ConvertFunctionPtr(obj3, (void**)(&arg4), SWIGTYPE_p_f_int_int_double__void); - if (!SWIG_IsOK(res)) { - SWIG_exception_fail(SWIG_ArgError(res), "in method '" "GridDynObjectOutputPartialDerivatives" "', argument " "4"" of type '" "void (*)(int,int,double)""'"); - } - } - res5 = SWIG_ConvertPtr(obj4,SWIG_as_voidptrptr(&arg5), 0, 0); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "GridDynObjectOutputPartialDerivatives" "', argument " "5"" of type '" "SolverKey""'"); - } - result = (griddyn_status)GridDynObjectOutputPartialDerivatives(arg1,(double const *)arg2,arg3,arg4,arg5); - resultobj = SWIG_From_int((int)(result)); - return resultobj; -fail: - return NULL; -} - - -static PyMethodDef SwigMethods[] = { - { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL}, - { (char *)"new_doublep", _wrap_new_doublep, METH_VARARGS, NULL}, - { (char *)"copy_doublep", _wrap_copy_doublep, METH_VARARGS, NULL}, - { (char *)"delete_doublep", _wrap_delete_doublep, METH_VARARGS, NULL}, - { (char *)"doublep_assign", _wrap_doublep_assign, METH_VARARGS, NULL}, - { (char *)"doublep_value", _wrap_doublep_value, METH_VARARGS, NULL}, - { (char *)"new_charp", _wrap_new_charp, METH_VARARGS, NULL}, - { (char *)"copy_charp", _wrap_copy_charp, METH_VARARGS, NULL}, - { (char *)"delete_charp", _wrap_delete_charp, METH_VARARGS, NULL}, - { (char *)"charp_assign", _wrap_charp_assign, METH_VARARGS, NULL}, - { (char *)"charp_value", _wrap_charp_value, METH_VARARGS, NULL}, - { (char *)"new_doubleArray", _wrap_new_doubleArray, METH_VARARGS, NULL}, - { (char *)"delete_doubleArray", _wrap_delete_doubleArray, METH_VARARGS, NULL}, - { (char *)"doubleArray___getitem__", _wrap_doubleArray___getitem__, METH_VARARGS, NULL}, - { (char *)"doubleArray___setitem__", _wrap_doubleArray___setitem__, METH_VARARGS, NULL}, - { (char *)"doubleArray_cast", _wrap_doubleArray_cast, METH_VARARGS, NULL}, - { (char *)"doubleArray_frompointer", _wrap_doubleArray_frompointer, METH_VARARGS, NULL}, - { (char *)"doubleArray_swigregister", doubleArray_swigregister, METH_VARARGS, NULL}, - { (char *)"GridDynObjectCreate", _wrap_GridDynObject_create, METH_VARARGS, NULL}, - { (char *)"GridDynObjectClone", _wrap_GridDynObject_clone, METH_VARARGS, NULL}, - { (char *)"GridDynObjectFree", _wrap_GridDynObject_free, METH_VARARGS, NULL}, - { (char *)"GridDynObjectAdd", _wrap_GridDynObject_add, METH_VARARGS, NULL}, - { (char *)"GridDynObjectRemove", _wrap_GridDynObject_remove, METH_VARARGS, NULL}, - { (char *)"GridDynObjectSetString", _wrap_GridDynObject_setString, METH_VARARGS, NULL}, - { (char *)"GridDynObjectSetValue", _wrap_GridDynObject_setValue, METH_VARARGS, NULL}, - { (char *)"GridDynObjectSetValueUnits", _wrap_GridDynObject_setValueUnits, METH_VARARGS, NULL}, - { (char *)"GridDynObjectSetFlag", _wrap_GridDynObject_setFlag, METH_VARARGS, NULL}, - { (char *)"GridDynObjectGetString", _wrap_GridDynObject_getString, METH_VARARGS, NULL}, - { (char *)"GridDynObjectGetValue", _wrap_GridDynObject_getValue, METH_VARARGS, NULL}, - { (char *)"GridDynObjectGetValueUnits", _wrap_GridDynObject_getValueUnits, METH_VARARGS, NULL}, - { (char *)"GridDynObjectGetFlag", _wrap_GridDynObject_getFlag, METH_VARARGS, NULL}, - { (char *)"GridDynObjectFind", _wrap_GridDynObject_find, METH_VARARGS, NULL}, - { (char *)"GridDynObjectGetSubObject", _wrap_GridDynObject_getSubObject, METH_VARARGS, NULL}, - { (char *)"GridDynObjectFindByUserId", _wrap_GridDynObject_findByUserId, METH_VARARGS, NULL}, - { (char *)"GridDynObjectGetParent", _wrap_GridDynObject_getParent, METH_VARARGS, NULL}, - { (char *)"GridDynObjectGetType", _wrap_GridDynObject_getType, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationCreate", _wrap_gridDynSimulationCreate, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationFree", _wrap_gridDynSimulationFree, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationInitializeFromString", _wrap_gridDynSimulationInitializeFromString, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationInitializeFromArgs", _wrap_gridDynSimulationInitializeFromArgs, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationLoadfile", _wrap_gridDynSimulationLoadfile, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationAddCommand", _wrap_gridDynSimulationAddCommand, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationPowerflowInitialize", _wrap_gridDynSimulationPowerflowInitialize, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationPowerflow", _wrap_gridDynSimulationPowerflow, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationDynamicInitialize", _wrap_gridDynSimulationDynamicInitialize, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationReset", _wrap_gridDynSimulationReset, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationGetCurrentTime", _wrap_gridDynSimulationGetCurrentTime, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationRun", _wrap_gridDynSimulationRun, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationRunTo", _wrap_gridDynSimulationRunTo, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationStep", _wrap_gridDynSimulationStep, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationRunAsync", _wrap_gridDynSimulationRunAsync, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationRunToAsync", _wrap_gridDynSimulationRunToAsync, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationStepAsync", _wrap_gridDynSimulationStepAsync, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationGetStatus", _wrap_gridDynSimulationGetStatus, METH_VARARGS, NULL}, - { (char *)"getSimulationObject", _wrap_getSimulationObject, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationGetSolverKey", _wrap_gridDynSimulationGetSolverKey, METH_VARARGS, NULL}, - { (char *)"gridDynSolverKeyFree", _wrap_gridDynSolverKeyFree, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationStateSize", _wrap_gridDynSimulationStateSize, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationBusCount", _wrap_gridDynSimulationBusCount, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationLineCount", _wrap_gridDynSimulationLineCount, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationGetResults", _wrap_gridDynSimulationGetResults, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationGuessState", _wrap_gridDynSimulationGuessState, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationSetState", _wrap_gridDynSimulationSetState, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationGetStateVariableTypes", _wrap_gridDynSimulationGetStateVariableTypes, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationResidual", _wrap_gridDynSimulationResidual, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationDerivative", _wrap_gridDynSimulationDerivative, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationAlgebraicUpdate", _wrap_gridDynSimulationAlgebraicUpdate, METH_VARARGS, NULL}, - { (char *)"gridDynSimulationJacobian", _wrap_gridDynSimulationJacobian, METH_VARARGS, NULL}, - { (char *)"GridDynSingleQueryCreate", _wrap_GridDynSingleQuery_create, METH_VARARGS, NULL}, - { (char *)"GridDynVectorQueryCreate", _wrap_GridDynVectorQuery_create, METH_VARARGS, NULL}, - { (char *)"GridDynSingleQueryFree", _wrap_GridDynSingleQuery_free, METH_VARARGS, NULL}, - { (char *)"GridDynVectorQueryFree", _wrap_GridDynVectorQuery_free, METH_VARARGS, NULL}, - { (char *)"GridDynSingleQueryRun", _wrap_GridDynSingleQuery_run, METH_VARARGS, NULL}, - { (char *)"GridDynVectorQueryRun", _wrap_GridDynVectorQuery_run, METH_VARARGS, NULL}, - { (char *)"GridDynVectorQueryAppend", _wrap_GridDynVectorQuery_append, METH_VARARGS, NULL}, - { (char *)"GridDynSingleQueryUpdate", _wrap_GridDynSingleQuery_update, METH_VARARGS, NULL}, - { (char *)"GridDynVectorQueryUpdate", _wrap_GridDynVectorQuery_update, METH_VARARGS, NULL}, - { (char *)"GridDynEventCreate", _wrap_GridDynEvent_create, METH_VARARGS, NULL}, - { (char *)"GridDynEventFree", _wrap_GridDynEvent_free, METH_VARARGS, NULL}, - { (char *)"GridDynEventTrigger", _wrap_GridDynEvent_trigger, METH_VARARGS, NULL}, - { (char *)"GridDynEventSchedule", _wrap_GridDynEvent_schedule, METH_VARARGS, NULL}, - { (char *)"GridDynEventSetValue", _wrap_GridDynEvent_setValue, METH_VARARGS, NULL}, - { (char *)"GridDynEventSetString", _wrap_GridDynEvent_setString, METH_VARARGS, NULL}, - { (char *)"GridDynEventSetFlag", _wrap_GridDynEvent_setFlag, METH_VARARGS, NULL}, - { (char *)"GridDynEventSetTarget", _wrap_GridDynEvent_setTarget, METH_VARARGS, NULL}, - { (char *)"GridDynObjectStateSize", _wrap_GridDynObject_stateSize, METH_VARARGS, NULL}, - { (char *)"GridDynObjectGuessState", _wrap_GridDynObject_guessState, METH_VARARGS, NULL}, - { (char *)"GridDynObjectSetState", _wrap_GridDynObject_setState, METH_VARARGS, NULL}, - { (char *)"GridDynObjectGetStateVariableTypes", _wrap_GridDynObject_getStateVariableTypes, METH_VARARGS, NULL}, - { (char *)"GridDynObjectResidual", _wrap_GridDynObject_residual, METH_VARARGS, NULL}, - { (char *)"GridDynObjectDerivative", _wrap_GridDynObject_derivative, METH_VARARGS, NULL}, - { (char *)"GridDynObjectAlgebraicUpdate", _wrap_GridDynObject_algebraicUpdate, METH_VARARGS, NULL}, - { (char *)"GridDynObjectJacobian", _wrap_GridDynObject_jacobian, METH_VARARGS, NULL}, - { (char *)"GridDynObjectIoPartialDerivatives", _wrap_GridDynObject_ioPartialDerivatives, METH_VARARGS, NULL}, - { (char *)"GridDynObjectOutputPartialDerivatives", _wrap_GridDynObject_outputPartialDerivatives, METH_VARARGS, NULL}, - { NULL, NULL, 0, NULL } -}; - - -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ - -static void *_p_doubleArrayTo_p_double(void *x, int *SWIGUNUSEDPARM(newmemory)) { - return (void *)((double *) ((doubleArray *) x)); -} -static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_doubleArray = {"_p_doubleArray", "doubleArray *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_f_int_int_double__void = {"_p_f_int_int_double__void", "void (*)(int,int,double)", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_griddyn_status_enum = {"_p_griddyn_status_enum", "enum griddyn_status_enum *|griddyn_status_enum *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_int = {"_p_int", "int *|griddyn_status *", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_void = {"_p_void", "GridDynObject|GridDynVectorQuery|GridDynSimulation|GridDynEvent|void *|SolverKey|GridDynSingleQuery", 0, 0, (void*)0, 0}; - -static swig_type_info *swig_type_initial[] = { - &_swigt__p_char, - &_swigt__p_double, - &_swigt__p_doubleArray, - &_swigt__p_f_int_int_double__void, - &_swigt__p_griddyn_status_enum, - &_swigt__p_int, - &_swigt__p_p_char, - &_swigt__p_void, -}; - -static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_double[] = { {&_swigt__p_doubleArray, _p_doubleArrayTo_p_double, 0, 0}, {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_doubleArray[] = { {&_swigt__p_doubleArray, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_f_int_int_double__void[] = { {&_swigt__p_f_int_int_double__void, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_griddyn_status_enum[] = { {&_swigt__p_griddyn_status_enum, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; - -static swig_cast_info *swig_cast_initial[] = { - _swigc__p_char, - _swigc__p_double, - _swigc__p_doubleArray, - _swigc__p_f_int_int_double__void, - _swigc__p_griddyn_status_enum, - _swigc__p_int, - _swigc__p_p_char, - _swigc__p_void, -}; - - -/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ - -static swig_const_info swig_const_table[] = { -{0, 0, 0, 0.0, 0, 0}}; - -#ifdef __cplusplus -} -#endif -/* ----------------------------------------------------------------------------- - * Type initialization: - * This problem is tough by the requirement that no dynamic - * memory is used. Also, since swig_type_info structures store pointers to - * swig_cast_info structures and swig_cast_info structures store pointers back - * to swig_type_info structures, we need some lookup code at initialization. - * The idea is that swig generates all the structures that are needed. - * The runtime then collects these partially filled structures. - * The SWIG_InitializeModule function takes these initial arrays out of - * swig_module, and does all the lookup, filling in the swig_module.types - * array with the correct data and linking the correct swig_cast_info - * structures together. - * - * The generated swig_type_info structures are assigned statically to an initial - * array. We just loop through that array, and handle each type individually. - * First we lookup if this type has been already loaded, and if so, use the - * loaded structure instead of the generated one. Then we have to fill in the - * cast linked list. The cast data is initially stored in something like a - * two-dimensional array. Each row corresponds to a type (there are the same - * number of rows as there are in the swig_type_initial array). Each entry in - * a column is one of the swig_cast_info structures for that type. - * The cast_initial array is actually an array of arrays, because each row has - * a variable number of columns. So to actually build the cast linked list, - * we find the array of casts associated with the type, and loop through it - * adding the casts to the list. The one last trick we need to do is making - * sure the type pointer in the swig_cast_info struct is correct. - * - * First off, we lookup the cast->type name to see if it is already loaded. - * There are three cases to handle: - * 1) If the cast->type has already been loaded AND the type we are adding - * casting info to has not been loaded (it is in this module), THEN we - * replace the cast->type pointer with the type pointer that has already - * been loaded. - * 2) If BOTH types (the one we are adding casting info to, and the - * cast->type) are loaded, THEN the cast info has already been loaded by - * the previous module so we just ignore it. - * 3) Finally, if cast->type has not already been loaded, then we add that - * swig_cast_info to the linked list (because the cast->type) pointer will - * be correct. - * ----------------------------------------------------------------------------- */ - -#ifdef __cplusplus -extern "C" { -#if 0 -} /* c-mode */ -#endif -#endif - -#if 0 -#define SWIGRUNTIME_DEBUG -#endif - - -SWIGRUNTIME void -SWIG_InitializeModule(void *clientdata) { - size_t i; - swig_module_info *module_head, *iter; - int init; - - /* check to see if the circular list has been setup, if not, set it up */ - if (swig_module.next==0) { - /* Initialize the swig_module */ - swig_module.type_initial = swig_type_initial; - swig_module.cast_initial = swig_cast_initial; - swig_module.next = &swig_module; - init = 1; - } else { - init = 0; - } - - /* Try and load any already created modules */ - module_head = SWIG_GetModule(clientdata); - if (!module_head) { - /* This is the first module loaded for this interpreter */ - /* so set the swig module into the interpreter */ - SWIG_SetModule(clientdata, &swig_module); - } else { - /* the interpreter has loaded a SWIG module, but has it loaded this one? */ - iter=module_head; - do { - if (iter==&swig_module) { - /* Our module is already in the list, so there's nothing more to do. */ - return; - } - iter=iter->next; - } while (iter!= module_head); - - /* otherwise we must add our module into the list */ - swig_module.next = module_head->next; - module_head->next = &swig_module; - } - - /* When multiple interpreters are used, a module could have already been initialized in - a different interpreter, but not yet have a pointer in this interpreter. - In this case, we do not want to continue adding types... everything should be - set up already */ - if (init == 0) return; - - /* Now work on filling in swig_module.types */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: size %d\n", swig_module.size); -#endif - for (i = 0; i < swig_module.size; ++i) { - swig_type_info *type = 0; - swig_type_info *ret; - swig_cast_info *cast; - -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); -#endif - - /* if there is another module already loaded */ - if (swig_module.next != &swig_module) { - type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); - } - if (type) { - /* Overwrite clientdata field */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found type %s\n", type->name); -#endif - if (swig_module.type_initial[i]->clientdata) { - type->clientdata = swig_module.type_initial[i]->clientdata; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); -#endif - } - } else { - type = swig_module.type_initial[i]; - } - - /* Insert casting types */ - cast = swig_module.cast_initial[i]; - while (cast->type) { - /* Don't need to add information already in the list */ - ret = 0; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); -#endif - if (swig_module.next != &swig_module) { - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); -#ifdef SWIGRUNTIME_DEBUG - if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); -#endif - } - if (ret) { - if (type == swig_module.type_initial[i]) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: skip old type %s\n", ret->name); -#endif - cast->type = ret; - ret = 0; - } else { - /* Check for casting already in the list */ - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); -#ifdef SWIGRUNTIME_DEBUG - if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); -#endif - if (!ocast) ret = 0; - } - } - - if (!ret) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); -#endif - if (type->cast) { - type->cast->prev = cast; - cast->next = type->cast; - } - type->cast = cast; - } - cast++; - } - /* Set entry in modules->types array equal to the type */ - swig_module.types[i] = type; - } - swig_module.types[i] = 0; - -#ifdef SWIGRUNTIME_DEBUG - printf("**** SWIG_InitializeModule: Cast List ******\n"); - for (i = 0; i < swig_module.size; ++i) { - int j = 0; - swig_cast_info *cast = swig_module.cast_initial[i]; - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); - while (cast->type) { - printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); - cast++; - ++j; - } - printf("---- Total casts: %d\n",j); - } - printf("**** SWIG_InitializeModule: Cast List ******\n"); -#endif -} - -/* This function will propagate the clientdata field of type to -* any new swig_type_info structures that have been added into the list -* of equivalent types. It is like calling -* SWIG_TypeClientData(type, clientdata) a second time. -*/ -SWIGRUNTIME void -SWIG_PropagateClientData(void) { - size_t i; - swig_cast_info *equiv; - static int init_run = 0; - - if (init_run) return; - init_run = 1; - - for (i = 0; i < swig_module.size; i++) { - if (swig_module.types[i]->clientdata) { - equiv = swig_module.types[i]->cast; - while (equiv) { - if (!equiv->converter) { - if (equiv->type && !equiv->type->clientdata) - SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); - } - equiv = equiv->next; - } - } - } -} - -#ifdef __cplusplus -#if 0 -{ - /* c-mode */ -#endif -} -#endif - - - -#ifdef __cplusplus -extern "C" { -#endif - - /* Python-specific SWIG API */ -#define SWIG_newvarlink() SWIG_Python_newvarlink() -#define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) -#define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) - - /* ----------------------------------------------------------------------------- - * global variable support code. - * ----------------------------------------------------------------------------- */ - - typedef struct swig_globalvar { - char *name; /* Name of global variable */ - PyObject *(*get_attr)(void); /* Return the current value */ - int (*set_attr)(PyObject *); /* Set the value */ - struct swig_globalvar *next; - } swig_globalvar; - - typedef struct swig_varlinkobject { - PyObject_HEAD - swig_globalvar *vars; - } swig_varlinkobject; - - SWIGINTERN PyObject * - swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { -#if PY_VERSION_HEX >= 0x03000000 - return PyUnicode_InternFromString(""); -#else - return PyString_FromString(""); -#endif - } - - SWIGINTERN PyObject * - swig_varlink_str(swig_varlinkobject *v) { -#if PY_VERSION_HEX >= 0x03000000 - PyObject *str = PyUnicode_InternFromString("("); - PyObject *tail; - PyObject *joined; - swig_globalvar *var; - for (var = v->vars; var; var=var->next) { - tail = PyUnicode_FromString(var->name); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; - if (var->next) { - tail = PyUnicode_InternFromString(", "); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; - } - } - tail = PyUnicode_InternFromString(")"); - joined = PyUnicode_Concat(str, tail); - Py_DecRef(str); - Py_DecRef(tail); - str = joined; -#else - PyObject *str = PyString_FromString("("); - swig_globalvar *var; - for (var = v->vars; var; var=var->next) { - PyString_ConcatAndDel(&str,PyString_FromString(var->name)); - if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); - } - PyString_ConcatAndDel(&str,PyString_FromString(")")); -#endif - return str; - } - - SWIGINTERN int - swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { - char *tmp; - PyObject *str = swig_varlink_str(v); - fprintf(fp,"Swig global variables "); - fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str)); - SWIG_Python_str_DelForPy3(tmp); - Py_DECREF(str); - return 0; - } - - SWIGINTERN void - swig_varlink_dealloc(swig_varlinkobject *v) { - swig_globalvar *var = v->vars; - while (var) { - swig_globalvar *n = var->next; - free(var->name); - free(var); - var = n; - } - } - - SWIGINTERN PyObject * - swig_varlink_getattr(swig_varlinkobject *v, char *n) { - PyObject *res = NULL; - swig_globalvar *var = v->vars; - while (var) { - if (strcmp(var->name,n) == 0) { - res = (*var->get_attr)(); - break; - } - var = var->next; - } - if (res == NULL && !PyErr_Occurred()) { - PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); - } - return res; - } - - SWIGINTERN int - swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { - int res = 1; - swig_globalvar *var = v->vars; - while (var) { - if (strcmp(var->name,n) == 0) { - res = (*var->set_attr)(p); - break; - } - var = var->next; - } - if (res == 1 && !PyErr_Occurred()) { - PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n); - } - return res; - } - - SWIGINTERN PyTypeObject* - swig_varlink_type(void) { - static char varlink__doc__[] = "Swig var link object"; - static PyTypeObject varlink_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { -#if PY_VERSION_HEX >= 0x03000000 - PyVarObject_HEAD_INIT(NULL, 0) -#else - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ -#endif - (char *)"swigvarlink", /* tp_name */ - sizeof(swig_varlinkobject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor) swig_varlink_dealloc, /* tp_dealloc */ - (printfunc) swig_varlink_print, /* tp_print */ - (getattrfunc) swig_varlink_getattr, /* tp_getattr */ - (setattrfunc) swig_varlink_setattr, /* tp_setattr */ - 0, /* tp_compare */ - (reprfunc) swig_varlink_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - (reprfunc) swig_varlink_str, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - 0, /* tp_flags */ - varlink__doc__, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ -#if PY_VERSION_HEX >= 0x02020000 - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ -#endif -#if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ -#endif -#if PY_VERSION_HEX >= 0x02060000 - 0, /* tp_version_tag */ -#endif -#if PY_VERSION_HEX >= 0x03040000 - 0, /* tp_finalize */ -#endif -#ifdef COUNT_ALLOCS - 0, /* tp_allocs */ - 0, /* tp_frees */ - 0, /* tp_maxalloc */ -#if PY_VERSION_HEX >= 0x02050000 - 0, /* tp_prev */ -#endif - 0 /* tp_next */ -#endif - }; - varlink_type = tmp; - type_init = 1; -#if PY_VERSION_HEX < 0x02020000 - varlink_type.ob_type = &PyType_Type; -#else - if (PyType_Ready(&varlink_type) < 0) - return NULL; -#endif - } - return &varlink_type; - } - - /* Create a variable linking object for use later */ - SWIGINTERN PyObject * - SWIG_Python_newvarlink(void) { - swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); - if (result) { - result->vars = 0; - } - return ((PyObject*) result); - } - - SWIGINTERN void - SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { - swig_varlinkobject *v = (swig_varlinkobject *) p; - swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); - if (gv) { - size_t size = strlen(name)+1; - gv->name = (char *)malloc(size); - if (gv->name) { - strncpy(gv->name,name,size); - gv->get_attr = get_attr; - gv->set_attr = set_attr; - gv->next = v->vars; - } - } - v->vars = gv; - } - - SWIGINTERN PyObject * - SWIG_globals(void) { - static PyObject *_SWIG_globals = 0; - if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); - return _SWIG_globals; - } - - /* ----------------------------------------------------------------------------- - * constants/methods manipulation - * ----------------------------------------------------------------------------- */ - - /* Install Constants */ - SWIGINTERN void - SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { - PyObject *obj = 0; - size_t i; - for (i = 0; constants[i].type; ++i) { - switch(constants[i].type) { - case SWIG_PY_POINTER: - obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); - break; - case SWIG_PY_BINARY: - obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); - break; - default: - obj = 0; - break; - } - if (obj) { - PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); - } - } - } - - /* -----------------------------------------------------------------------------*/ - /* Fix SwigMethods to carry the callback ptrs when needed */ - /* -----------------------------------------------------------------------------*/ - - SWIGINTERN void - SWIG_Python_FixMethods(PyMethodDef *methods, - swig_const_info *const_table, - swig_type_info **types, - swig_type_info **types_initial) { - size_t i; - for (i = 0; methods[i].ml_name; ++i) { - const char *c = methods[i].ml_doc; - if (!c) continue; - c = strstr(c, "swig_ptr: "); - if (c) { - int j; - swig_const_info *ci = 0; - const char *name = c + 10; - for (j = 0; const_table[j].type; ++j) { - if (strncmp(const_table[j].name, name, - strlen(const_table[j].name)) == 0) { - ci = &(const_table[j]); - break; - } - } - if (ci) { - void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; - if (ptr) { - size_t shift = (ci->ptype) - types; - swig_type_info *ty = types_initial[shift]; - size_t ldoc = (c - methods[i].ml_doc); - size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; - char *ndoc = (char*)malloc(ldoc + lptr + 10); - if (ndoc) { - char *buff = ndoc; - strncpy(buff, methods[i].ml_doc, ldoc); - buff += ldoc; - strncpy(buff, "swig_ptr: ", 10); - buff += 10; - SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); - methods[i].ml_doc = ndoc; - } - } - } - } - } - } - -#ifdef __cplusplus -} -#endif - -/* -----------------------------------------------------------------------------* - * Partial Init method - * -----------------------------------------------------------------------------*/ - -#ifdef __cplusplus -extern "C" -#endif - -SWIGEXPORT -#if PY_VERSION_HEX >= 0x03000000 -PyObject* -#else -void -#endif -SWIG_init(void) { - PyObject *m, *d, *md; -#if PY_VERSION_HEX >= 0x03000000 - static struct PyModuleDef SWIG_module = { -# if PY_VERSION_HEX >= 0x03020000 - PyModuleDef_HEAD_INIT, -# else - { - PyObject_HEAD_INIT(NULL) - NULL, /* m_init */ - 0, /* m_index */ - NULL, /* m_copy */ - }, -# endif - (char *) SWIG_name, - NULL, - -1, - SwigMethods, - NULL, - NULL, - NULL, - NULL - }; -#endif - -#if defined(SWIGPYTHON_BUILTIN) - static SwigPyClientData SwigPyObject_clientdata = { - 0, 0, 0, 0, 0, 0, 0 - }; - static PyGetSetDef this_getset_def = { - (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL - }; - static SwigPyGetSet thisown_getset_closure = { - (PyCFunction) SwigPyObject_own, - (PyCFunction) SwigPyObject_own - }; - static PyGetSetDef thisown_getset_def = { - (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure - }; - PyTypeObject *builtin_pytype; - int builtin_base_count; - swig_type_info *builtin_basetype; - PyObject *tuple; - PyGetSetDescrObject *static_getset; - PyTypeObject *metatype; - PyTypeObject *swigpyobject; - SwigPyClientData *cd; - PyObject *public_interface, *public_symbol; - PyObject *this_descr; - PyObject *thisown_descr; - PyObject *self = 0; - int i; - - (void)builtin_pytype; - (void)builtin_base_count; - (void)builtin_basetype; - (void)tuple; - (void)static_getset; - (void)self; - - /* Metaclass is used to implement static member variables */ - metatype = SwigPyObjectType(); - assert(metatype); -#endif - - /* Fix SwigMethods to carry the callback ptrs when needed */ - SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); - -#if PY_VERSION_HEX >= 0x03000000 - m = PyModule_Create(&SWIG_module); -#else - m = Py_InitModule((char *) SWIG_name, SwigMethods); -#endif - - md = d = PyModule_GetDict(m); - (void)md; - - SWIG_InitializeModule(0); - -#ifdef SWIGPYTHON_BUILTIN - swigpyobject = SwigPyObject_TypeOnce(); - - SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject"); - assert(SwigPyObject_stype); - cd = (SwigPyClientData*) SwigPyObject_stype->clientdata; - if (!cd) { - SwigPyObject_stype->clientdata = &SwigPyObject_clientdata; - SwigPyObject_clientdata.pytype = swigpyobject; - } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) { - PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules."); -# if PY_VERSION_HEX >= 0x03000000 - return NULL; -# else - return; -# endif - } - - /* All objects have a 'this' attribute */ - this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def); - (void)this_descr; - - /* All objects have a 'thisown' attribute */ - thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def); - (void)thisown_descr; - - public_interface = PyList_New(0); - public_symbol = 0; - (void)public_symbol; - - PyDict_SetItemString(md, "__all__", public_interface); - Py_DECREF(public_interface); - for (i = 0; SwigMethods[i].ml_name != NULL; ++i) - SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name); - for (i = 0; swig_const_table[i].name != 0; ++i) - SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name); -#endif - - SWIG_InstallConstants(d,swig_const_table); - - SWIG_Python_SetConstant(d, "griddyn_ok",SWIG_From_int((int)(griddyn_ok))); - SWIG_Python_SetConstant(d, "griddyn_invalid_object",SWIG_From_int((int)(griddyn_invalid_object))); - SWIG_Python_SetConstant(d, "griddyn_invalid_parameter_value",SWIG_From_int((int)(griddyn_invalid_parameter_value))); - SWIG_Python_SetConstant(d, "griddyn_unknown_parameter",SWIG_From_int((int)(griddyn_unknown_parameter))); - SWIG_Python_SetConstant(d, "griddyn_add_failure",SWIG_From_int((int)(griddyn_add_failure))); - SWIG_Python_SetConstant(d, "griddyn_remove_failure",SWIG_From_int((int)(griddyn_remove_failure))); - SWIG_Python_SetConstant(d, "griddyn_query_load_failure",SWIG_From_int((int)(griddyn_query_load_failure))); - SWIG_Python_SetConstant(d, "griddyn_file_load_failure",SWIG_From_int((int)(griddyn_file_load_failure))); - SWIG_Python_SetConstant(d, "griddyn_solve_error",SWIG_From_int((int)(griddyn_solve_error))); - SWIG_Python_SetConstant(d, "griddyn_object_not_initialized",SWIG_From_int((int)(griddyn_object_not_initialized))); - SWIG_Python_SetConstant(d, "griddyn_invalid_function_call",SWIG_From_int((int)(griddyn_invalid_function_call))); - SWIG_Python_SetConstant(d, "griddyn_function_failure",SWIG_From_int((int)(griddyn_function_failure))); - SWIG_Python_SetConstant(d, "GRIDDYN_PENDING",SWIG_From_int((int)((25)))); - SWIG_Python_SetConstant(d, "GRIDDYN_COMPLETE",SWIG_From_int((int)((30)))); -#if PY_VERSION_HEX >= 0x03000000 - return m; -#else - return; -#endif -} diff --git a/interfaces/python/setup.py.in b/interfaces/python/setup.py.in deleted file mode 100644 index b0c7de75b..000000000 --- a/interfaces/python/setup.py.in +++ /dev/null @@ -1,76 +0,0 @@ -# -# LLNS Copyright Start -# Copyright (c) 2014-2018, Lawrence Livermore National Security -# This work was performed under the auspices of the U.S. Department -# of Energy by Lawrence Livermore National Laboratory in part under -# Contract W-7405-Eng-48 and in part under Contract DE-AC52-07NA27344. -# Produced at the Lawrence Livermore National Laboratory. -# All rights reserved. -# For details, see the LICENSE file. -# LLNS Copyright End -# - -import subprocess -import shlex - -import os -from distutils.core import setup, Extension - -import platform - -VERSION = os.getenv("PYGRIDDYN_PACKAGE_VERSION", '${GRIDDYN_VERSION_MAJOR}.${GRIDDYN_VERSION_MINOR}.${GRIDDYN_VERSION_PATCH}') - -if 'GRIDDYN_VERSION_MAJOR' in VERSION: - print("Unable to find PYGRIDDYN_PACKAGE_VERSION environment variable. Please check the documentation or contact the developers.") - import sys - sys.exit(1) - -if platform.system() == 'Darwin': - os_specific_cflags = '' - os_specific_ldflags = '' # '-shared' - extra_compile_args = [] -else: - os_specific_cflags = '' - os_specific_ldflags = '' - extra_compile_args = ['-std=c++11'] - -GRIDDYN_INSTALL = os.path.abspath(os.getenv("GRIDDYN_INSTALL", '${CMAKE_CURRENT_BINARY_DIR}')) -GRIDDYN_INCLUDE_DIR = os.path.abspath(os.getenv("GRIDDYN_INCLUDE", os.path.join(GRIDDYN_INSTALL, "../../../src/griddyn_shared/"))) -GRIDDYN_LIB_DIR = os.path.abspath(os.getenv("GRIDDYN_INCLUDE", os.path.join(GRIDDYN_INSTALL, "../../src/griddyn_shared/"))) -ZMQ_INCLUDE_DIR = os.path.abspath(os.getenv("ZMQ_INCLUDE", os.path.join(GRIDDYN_INSTALL, "."))) -ZMQ_LIB_DIR = os.path.abspath(os.getenv("ZMQ_LIB", os.path.join(GRIDDYN_INSTALL, "."))) - -if GRIDDYN_INSTALL is None or "CMAKE_INSTALL_PREFIX" in GRIDDYN_INSTALL: - - print("Unable to find GRIDDYN_INSTALL environment variable. Please check the documentation or contact the developers.") - import sys - sys.exit(1) - -os.environ['CFLAGS'] = '-Wall -I"{}" -I"{}" -I"{}" -I"{}" -fPIC {os_specific_cflags}'.format( - GRIDDYN_INCLUDE_DIR, - os.path.join(GRIDDYN_INCLUDE_DIR, 'griddyn'), - os.path.join(GRIDDYN_INCLUDE_DIR, 'griddyn_shared'), - ZMQ_INCLUDE_DIR, - os_specific_cflags=os_specific_cflags, -) - -os.environ['LDFLAGS'] = '{} -lzmq -L"{}" -L"{}"'.format(os_specific_ldflags, GRIDDYN_LIB_DIR, ZMQ_LIB_DIR) -griddyn_module = Extension( - "_griddyn", - sources=[ - "griddynPythonPYTHON_wrap.c", - ], - libraries=[ - "griddyn_shared_library", - ], - extra_compile_args=extra_compile_args, -) - -setup( - name='griddyn', - version='${PACKAGE_VERSION}', - author="Denis Nadeau and Philip Top", - ext_modules=[griddyn_module], - py_modules=["griddyn"], - license='LLNL' -) diff --git a/interfaces/python/setup_old.py.in b/interfaces/python/setup_old.py.in deleted file mode 100644 index 30abc6507..000000000 --- a/interfaces/python/setup_old.py.in +++ /dev/null @@ -1,10 +0,0 @@ -from distutils.core import setup, Extension - -if __name__ == '__main__': - setup( - name='griddyn', - version='${PACKAGE_VERSION}', - package_dir={'griddyn':'${CMAKE_BINARY_DIR}/swig/python/griddyn' }, - packages=['griddyn'], - package_data={'griddyn':['*.so']}, - license='LLNL') diff --git a/interfaces/setup.py.in b/interfaces/setup.py.in deleted file mode 100644 index a89452c5a..000000000 --- a/interfaces/setup.py.in +++ /dev/null @@ -1,10 +0,0 @@ -from distutils.core import setup, Extension - -if __name__ == '__main__': - setup( - name='griddyn', - version='${PACKAGE_VERSION}', - package_dir={'griddyn':'griddyn' }, - packages=['griddyn'], - package_data={'griddyn':['*.so']}, - license='LLNL') diff --git a/interfaces/swig_compile.sh b/interfaces/swig_compile.sh deleted file mode 100755 index 9445c4d05..000000000 --- a/interfaces/swig_compile.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -INC=$(python -c "import distutils.sysconfig; print(distutils.sysconfig.PREFIX)")/include -#FILELIST=`ls -1 ../src/griddyn_shared/*.cpp` -CONFIGH=$(find ../build -name "config.h" -exec dirname {} \;) -INCPYTHON=$(python -c "from distutils import sysconfig; print(sysconfig.get_python_inc())") -SITEPACKAGES=$(python -c "import sysconfig; print(sysconfig.get_path('purelib'))") -echo compiling griddyn -#swig -I/software/griddyn/src/coupling -I/software/griddyn/src/extraModels -I/software/griddyn/src/fmi -I/software/griddyn/src/fmi_export -I/software/griddyn/src/fncs -I/software/griddyn/src/formatInterpreters -I/software/griddyn/src/fskit -I/software/griddyn/src/gridDynMain -I/software/griddyn/src/gridDynServer -I/software/griddyn/src/griddyn_shared -I/software/griddyn/src/helics -I/software/griddyn/src/optimization -I/software/griddyn/src/plugins -I/software/griddyn/src/utilities -I/software/griddyn/src/zmqlib -I/software/griddyn/src/gridDynCombined -I/software/griddyn/src/gridDynCombined -I/software/griddyn/src/fileInput/ -I/software/griddyn/src/griddyn/ -python griddyn.i - -swig -I/software/griddyn/src/griddyn_shared -python griddyn.i - -echo "${INC}" -echo "${CONFIGH}" -echo "${INCPYTHON}" -#g++ -fPIC -DBUILD_DLL ${FILELIST} griddyn_wrap.c -I${INCPYTHON} -I. -I../src -I../src/griddyn -I../src/griddyn_shared -I${CONFIGH} -I${INC}/boost -I${INC}/boost/containers -I${INC} -shared -o _griddyn.so -L/software/anaconda2/envs/gridDyn/lib/ -lgriddyn -lcoreObjects -lutilities -lminizip -lz -lboost_filesystem -lboost_program_options -lsundials_ida -lsundials_cvode -lsundials_arkode -lsundials_kinsol -lcoupling_static_lib -lsundials_nvecserial -lgridDynCombined -lextraModelLibrary -lformatInterpreter -ltinyxml2 -lticpp -lfileInput -g++ -fPIC -DBUILD_DLL griddyn_wrap.c -I../src/griddyn_shared -I"${INCPYTHON}" -I"${CONFIGH}" -I"${INC}" -shared -o _griddyn.so -L/software/anaconda2/envs/gridDyn/lib/ -lgriddyn_shared_lib -cp griddyn.py "${SITEPACKAGES}/griddyn/" -cp _griddyn.so "${SITEPACKAGES}/griddyn/" - -swig -I/software/griddyn/src/griddyn_shared -matlab griddyn.i -g++ -shared -fPIC -DBUILD_DLL griddyn_wrap.cxx -I /export/software/matlab/R2017b/extern/include/ -I../src/griddyn_shared -I"${INCPYTHON}" -I"${CONFIGH}" -I"${INC}" -shared -o griddynMEX.mexa64 -L/software/anaconda2/envs/gridDyn/lib/ -lgriddyn_shared_lib -L/export/software/matlab/R2017b/bin/glnxa64 -lmx -lmex -# export LD_LIBRARY_PATH=/software/anaconda2/envs/gridDyn/lib:/export/software/matlab/R2017b/bin/glnxa64 diff --git a/interfaces/test.py b/interfaces/test.py deleted file mode 100644 index f59991fca..000000000 --- a/interfaces/test.py +++ /dev/null @@ -1,4 +0,0 @@ -import griddyn - -gds = griddyn.gridDynSimulationCreate("FMI", "testSym") -print(gds) diff --git a/interfaces/test/test_basic.m b/interfaces/test/test_basic.m deleted file mode 100644 index e62baa814..000000000 --- a/interfaces/test/test_basic.m +++ /dev/null @@ -1,117 +0,0 @@ -% LLNS Copyright Start -% Copyright (c) 2017, Lawrence Livermore National Security -% This work was performed under the auspices of the U.S. Department -% of Energy by Lawrence Livermore National Laboratory in part under -% Contract W-7405-Eng-48 and in part under Contract DE-AC52-07NA27344. -% Produced at the Lawrence Livermore National Laboratory. -% All rights reserved. -% For details, see the LICENSE file. -% LLNS Copyright End -function tests = test_basic -tests = functiontests(localfunctions); -end - -%% isAlmostEqual -% Test whether floating point numbers are close enough -%% Syntax -% out = isAlmostEqual(a,b) -%% -function out = isAlmostEqual(a,b,delta) - out = isequal(a,b); - if out==false - if ~isfloat(a) || ~isfloat(b) - error('isAlmostEqual:arguments', 'Arguments must float.') - end - a = a(:); - b = b(:); - % Relative difference - difference = abs(a-b); - relative = difference./max(abs([a b]),[],2); - comparison = relative