Skip to content

Commit

Permalink
Merge pull request #1180 from robotology/bindings/unordered_map_python
Browse files Browse the repository at this point in the history
Expose `std::unordered_map<std::string, double>` to SWIG bindings
  • Loading branch information
traversaro authored Apr 23, 2024
2 parents 7036db4 + 6ef64eb commit 43b9b7a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bindings/iDynTree.i
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#endif

%include "std_string.i"
%include "std_unordered_map.i"
%include "std_vector.i"

// std::shared_ptr holder is currently supported only for python bindings
Expand All @@ -19,6 +20,9 @@
// Wrap the std::vector<std::int> params
%template(IntVector) std::vector<int>;

// Wrap the std::unordered_map<std::string, double>
%template(StringToDoubleUnorderedMap) std::unordered_map<std::string, double>;

// Ignore some methods to avoid warnings
%include "./ignore.i"

Expand Down

0 comments on commit 43b9b7a

Please sign in to comment.