diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/gras/CMakeLists.txt | 1 | ||||
-rw-r--r-- | include/gras/buffer_queue.hpp | 2 | ||||
-rw-r--r-- | include/gras/element.i | 14 | ||||
-rw-r--r-- | include/gras/exception.i | 18 | ||||
-rw-r--r-- | include/gras/tags.i | 5 |
5 files changed, 27 insertions, 13 deletions
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> |