summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------grextras0
-rw-r--r--include/gras/CMakeLists.txt1
-rw-r--r--include/gras/buffer_queue.hpp2
-rw-r--r--include/gras/element.i14
-rw-r--r--include/gras/exception.i18
-rw-r--r--include/gras/tags.i5
-rw-r--r--python/gras/GRAS_SBuffer.i4
-rw-r--r--python/gras/GRAS_ThreadPool.i2
8 files changed, 31 insertions, 15 deletions
diff --git a/grextras b/grextras
-Subproject f1b0ef18f2517c65255403b6f6510bf189b7caf
+Subproject bbf24c27e93645e0e101a035a9c8bebdccfdd21
diff --git a/include/gras/CMakeLists.txt b/include/gras/CMakeLists.txt
index 1ab9a4c..7f37b1a 100644
--- a/include/gras/CMakeLists.txt
+++ b/include/gras/CMakeLists.txt
@@ -3,6 +3,7 @@
########################################################################
install(FILES
+ exception.i
chrono.hpp
block.hpp
block.i
diff --git a/include/gras/buffer_queue.hpp b/include/gras/buffer_queue.hpp
index da8de41..0a68030 100644
--- a/include/gras/buffer_queue.hpp
+++ b/include/gras/buffer_queue.hpp
@@ -17,6 +17,8 @@ typedef boost::shared_ptr<BufferQueue> BufferQueueSptr;
//! Buffer Queue is an interface enabling us to create custom buffer allocators.
struct BufferQueue
{
+ //! virtual destructor
+ virtual ~BufferQueue(void){}
/*!
* Create a buffer queue object using the pool allocator.
diff --git a/include/gras/element.i b/include/gras/element.i
index ecfa898..bcf07c2 100644
--- a/include/gras/element.i
+++ b/include/gras/element.i
@@ -13,23 +13,11 @@ namespace gras
}
////////////////////////////////////////////////////////////////////////
-// remove base class warning
+// remove base class warning -- boost::shared_ptr<ElementImpl>
////////////////////////////////////////////////////////////////////////
#pragma SWIG nowarn=401
////////////////////////////////////////////////////////////////////////
-// http://www.swig.org/Doc2.0/Library.html#Library_stl_exceptions
-////////////////////////////////////////////////////////////////////////
-%include <exception.i>
-
-%exception
-{
- try{$action}
- catch (const std::exception& e)
- {SWIG_exception(SWIG_RuntimeError, e.what());}
-}
-
-////////////////////////////////////////////////////////////////////////
// Export swig element comprehension
////////////////////////////////////////////////////////////////////////
%include <std_string.i>
diff --git a/include/gras/exception.i b/include/gras/exception.i
new file mode 100644
index 0000000..5ed2cd3
--- /dev/null
+++ b/include/gras/exception.i
@@ -0,0 +1,18 @@
+// Copyright (C) by Josh Blum. See LICENSE.txt for licensing information.
+
+#ifndef INCLUDED_GRAS_EXCEPTION_I
+#define INCLUDED_GRAS_EXCEPTION_I
+
+////////////////////////////////////////////////////////////////////////
+// http://www.swig.org/Doc2.0/Library.html#Library_stl_exceptions
+////////////////////////////////////////////////////////////////////////
+%include <exception.i>
+
+%exception
+{
+ try{$action}
+ catch (const std::exception& e)
+ {SWIG_exception(SWIG_RuntimeError, e.what());}
+}
+
+#endif /*INCLUDED_GRAS_EXCEPTION_I*/
diff --git a/include/gras/tags.i b/include/gras/tags.i
index 33838e2..bf2bdb4 100644
--- a/include/gras/tags.i
+++ b/include/gras/tags.i
@@ -7,6 +7,11 @@
#include <gras/tags.hpp>
%}
+////////////////////////////////////////////////////////////////////////
+// remove base class warning -- boost::less_than_comparable<Tag>
+////////////////////////////////////////////////////////////////////////
+#pragma SWIG nowarn=401
+
%include <gras/gras.hpp>
%include <gras/tags.hpp>
%import <gras/sbuffer.i>
diff --git a/python/gras/GRAS_SBuffer.i b/python/gras/GRAS_SBuffer.i
index 74cc475..867d2f1 100644
--- a/python/gras/GRAS_SBuffer.i
+++ b/python/gras/GRAS_SBuffer.i
@@ -1,9 +1,9 @@
// Copyright (C) by Josh Blum. See LICENSE.txt for licensing information.
-%include <gras/sbuffer.i>
-
%include <PMC/Registry.i>
+%include <gras/sbuffer.i>
+
DECL_PMC_SWIG_TYPE(gras::SBuffer, swig_sbuffer)
%pythoncode %{
diff --git a/python/gras/GRAS_ThreadPool.i b/python/gras/GRAS_ThreadPool.i
index 4cf75e0..88fb8c3 100644
--- a/python/gras/GRAS_ThreadPool.i
+++ b/python/gras/GRAS_ThreadPool.i
@@ -9,6 +9,8 @@
////////////////////////////////////////////////////////////////////////
#pragma SWIG nowarn=401
+%include <gras/exception.i>
+
%include <std_string.i>
%include <gras/gras.hpp>