From 3190292cf36b408479f8375a3e54be098ac0be93 Mon Sep 17 00:00:00 2001 From: Derek Bankieris Date: Thu, 5 Nov 2020 09:49:02 -0600 Subject: [PATCH] Add units to swig_int and swig_double Closes #1072 --- trick_source/trick_swig/swig_double.i | 4 ++++ trick_source/trick_swig/swig_int.i | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/trick_source/trick_swig/swig_double.i b/trick_source/trick_swig/swig_double.i index 81fdc769..1427c866 100644 --- a/trick_source/trick_swig/swig_double.i +++ b/trick_source/trick_swig/swig_double.i @@ -1,6 +1,8 @@ %module swig_double +%include "std_string.i" + %{ #include "trick/swig/swig_double.hh" @@ -11,6 +13,8 @@ // expose the __str__ function to swig so that it can do pretty prints of parameters with units class swig_double { public: + std::string units; + char * __str__() ; char * __repr__() ; diff --git a/trick_source/trick_swig/swig_int.i b/trick_source/trick_swig/swig_int.i index c2c85bf8..d04bc52a 100644 --- a/trick_source/trick_swig/swig_int.i +++ b/trick_source/trick_swig/swig_int.i @@ -1,6 +1,8 @@ %module swig_int +%include "std_string.i" + %{ #include "trick/swig/swig_int.hh" @@ -11,6 +13,8 @@ // expose the __str__ function to swig so that it can do pretty prints of parameters with units class swig_int { public: + std::string units; + char * __str__() ; char * __repr__() ;