Skip to content

Commit

Permalink
fix compilation of language bindings with swig4 for java and C#
Browse files Browse the repository at this point in the history
  • Loading branch information
fbergmann committed Nov 7, 2024
1 parent 7185afa commit 6b29ea5
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions copasi/bindings/csharp/local.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
#include <copasi/model/CModelParameter.h>
#include <copasi/model/CModelParameterSet.h>

#include <copasi/CopasiTypes.h>


// Now we specify the definitions
// for the type determination methods

Expand Down
2 changes: 2 additions & 0 deletions copasi/bindings/swig/CCopasiTask.i
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@
%warnfilter(325) CDescription;
%warnfilter(325) CResult;

#if (!defined SWIGJAVA)
%template(TaskSubTypeVector) std::vector<CTaskEnum::Task>;
%template(MethodSubTypeVector) std::vector<CTaskEnum::Method>;
#endif

%include "copasi/utilities/CTaskEnum.h"
%include "copasi/utilities/CCopasiTask.h"
Expand Down
2 changes: 2 additions & 0 deletions copasi/bindings/swig/CDataObject.i
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ namespace std {

#if !defined(SWIGR) && !defined(SWIGPERL) && !defined(SWIGOCTAVE)
%template(DataObjectSet) set< const CDataObject * >;
#if (!defined SWIGJAVA)
%template(DataObjectMap) map< const CDataObject *, const CDataObject * >;
#endif
%template(DataObjectVector) vector< const CDataObject * >;
%template(VectorOfDataObjectVector) vector< vector< const CDataObject * > >;
#endif // !defined(SWIGR) && !defined(SWIGPERL) && !defined(SWIGOCTAVE)
Expand Down
2 changes: 2 additions & 0 deletions copasi/bindings/swig/CDataVector.i
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@
%template(ReferenceVector) CDataVector<CReference>;
%template(ModificationVector) CDataVector<CModification>;

#if (!defined SWIGJAVA)
%template(ObjectListTypeStdVector) std::vector<CObjectLists::ListType>;
#endif

typedef CDataVectorN<CEvent> EventVectorN;

Expand Down
2 changes: 2 additions & 0 deletions copasi/bindings/swig/CModel.i
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@

%template(ObjectStdVector) std::vector<CDataObject*>;
typedef std::vector<CDataObject*> ObjectStdVector;
#if (!defined SWIGJAVA)
%template(StringUnitMap) std::map< std::string, CUnit >;
typedef std::map< std::string, CUnit > StringUnitMap;
%template(StringDoubleMap) std::map< std::string, double >;
typedef std::map< std::string, double > StringDoubleMap;
#endif

%ignore CUnit::getSymbolComponents;
%ignore CUnit::SymbolComponent;
Expand Down
1 change: 1 addition & 0 deletions copasi/bindings/swig/copasi.i
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ LIBCOMBINE_CPP_NAMESPACE_USE
#include "local.cpp"

#include <copasi/core/CCore.h>
#include <copasi/CopasiTypes.h>

/**
* This method is used to get the C_INVALID_INDEX
Expand Down

0 comments on commit 6b29ea5

Please sign in to comment.