Skip to content

Commit

Permalink
Merge pull request #2032 from baoilleach/UpdateCSharp
Browse files Browse the repository at this point in the history
Update the CSharp bindings
  • Loading branch information
baoilleach committed Sep 12, 2019
2 parents 4f1c718 + c9daca8 commit 62bc9b4
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions scripts/openbabel-csharp.i
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,9 @@ using System.Runtime.InteropServices;
#include <openbabel/math/vector3.h>
#include <openbabel/math/matrix3x3.h>
#include <openbabel/math/transform3d.h>

#include <openbabel/generic.h>
#include <openbabel/griddata.h>

#include <openbabel/base.h>
#include <openbabel/mol.h>
Expand Down Expand Up @@ -689,21 +691,6 @@ using System.Runtime.InteropServices;
%include "std_string.i"
%include "std_vector.i"

%typemap(cscode) std::vector<T>
%{
//ForEach method to simplify working around the foreach/delegate interaction "bug"
#if !SWIG_DOTNET_1
public void ForEach(Action<CSTYPE> action)
{
if(action == null)
throw new ArgumentNullException("action");

for(int i = 0 ;i<Count; i++)
action(getitem(i));
}
#endif
%}

%template (VectorInt) std::vector<int>;
// Note that the following line will fail if the space between
// the two greater-than signs is removed!
Expand Down Expand Up @@ -815,14 +802,14 @@ using System.Runtime.InteropServices;

//why is AliasData not supported?
CAST_GENERICDATA_TO(AngleData);
CAST_GENERICDATA_TO(ChiralData);
CAST_GENERICDATA_TO(CommentData);
CAST_GENERICDATA_TO(ConformerData);
CAST_GENERICDATA_TO(ExternalBondData);
CAST_GENERICDATA_TO(GridData);
CAST_GENERICDATA_TO(MatrixData);
CAST_GENERICDATA_TO(NasaThermoData);
CAST_GENERICDATA_TO(PairData);
CAST_GENERICDATA_TO(PairInteger);
// CAST_GENERICDATA_TO(PairTemplate);
CAST_GENERICDATA_TO(RateData);
CAST_GENERICDATA_TO(RotamerList);
Expand Down

0 comments on commit 62bc9b4

Please sign in to comment.