summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/gras/element.i23
1 files changed, 20 insertions, 3 deletions
diff --git a/include/gras/element.i b/include/gras/element.i
index ef1eb95..a5e9173 100644
--- a/include/gras/element.i
+++ b/include/gras/element.i
@@ -21,13 +21,30 @@
#include <gras/element.hpp>
%}
-%include <std_string.i>
+////////////////////////////////////////////////////////////////////////
+// Create bogus base classes to kill warnings
+////////////////////////////////////////////////////////////////////////
+namespace boost
+{
+ template <typename T>
+ struct enable_shared_from_this{};
+ template <typename T>
+ struct shared_ptr{};
+}
-//remove base class warning
-#pragma SWIG nowarn=401
+%template () boost::shared_ptr< gras::ElementImpl >;
+%template () boost::enable_shared_from_this< gras::Element >;
+////////////////////////////////////////////////////////////////////////
+// Export swig element comprehension
+////////////////////////////////////////////////////////////////////////
%include <gras/element.hpp>
+////////////////////////////////////////////////////////////////////////
+// Create a __str__ for this object
+////////////////////////////////////////////////////////////////////////
+%include <std_string.i>
+
namespace gras
{
%extend Element