summaryrefslogtreecommitdiff
path: root/src/core/managed/ManagedContainer.hpp
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2014-12-14 02:03:52 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2014-12-14 02:03:52 +0100
commitc5d18a42da8e9ed19c9520308fef087f4fb76323 (patch)
tree76df915327f053ea5438f7203d2cf94177f7d8b3 /src/core/managed/ManagedContainer.hpp
parent467d8d52ffda8b5d520ee0eb1e42125bdb533ff4 (diff)
added data functions and memory tagging functions. As it turns out the latter are unnecessary and will be removed
Diffstat (limited to 'src/core/managed/ManagedContainer.hpp')
-rw-r--r--src/core/managed/ManagedContainer.hpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/core/managed/ManagedContainer.hpp b/src/core/managed/ManagedContainer.hpp
index 9ff75d5..7b18bcd 100644
--- a/src/core/managed/ManagedContainer.hpp
+++ b/src/core/managed/ManagedContainer.hpp
@@ -31,8 +31,8 @@
namespace ousia {
/**
- * Template class which can be used to collect "Owned" refrences to a certain
- * type of managed object. Do not use this class directly, use ManagedMap or
+ * Template class which can be used to collect refrences to a certain type of
+ * managed objects. Do not use this class directly, use ManagedMap or
* ManagedVector instead. This class only provides functionality which is common
* to list and map containers (iterators and state).
*
@@ -40,7 +40,7 @@ namespace ousia {
* @param Collection should be a STL container of Owned<T>
*/
template <class T, class Collection>
-class ManagedContainer {
+class ManagedContainer : Managed {
public:
using collection_type = Collection;
using value_type = typename collection_type::value_type;
@@ -81,7 +81,12 @@ public:
* @param owner is the managed object which owns the collection and all
* handles to other managed objects stored within.
*/
- ManagedContainer(Handle<Managed> owner) : owner(owner){};
+ ManagedContainer(Handle<Managed> owner) : Managed(owner->getManager), owner(owner){};
+
+ /**
+ * Destructor of the ManagedContainer class.
+ */
+ virtual ~ManagedContainer() {};
/* State functions */
size_type size() const noexcept { return c.size(); }