summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2014-12-21 23:48:53 +0100
committerAndreas Stöckel <andreas@somweyr.de>2014-12-21 23:48:53 +0100
commitbe83abccf09a339f7356ff6ba6b89f5a46e6da57 (patch)
tree91eb3b99f87f46bba44e9830af8f10d14ab268fd /src
parent9c02d6698f852d94736ce3a88e593bf45d22361d (diff)
added additional constructor (initializer list) to ManagedContainer classes
Diffstat (limited to 'src')
-rw-r--r--src/core/managed/ManagedContainer.hpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/managed/ManagedContainer.hpp b/src/core/managed/ManagedContainer.hpp
index 6bf1915..f58cb59 100644
--- a/src/core/managed/ManagedContainer.hpp
+++ b/src/core/managed/ManagedContainer.hpp
@@ -28,6 +28,7 @@
#define _OUSIA_MANAGED_CONTAINER_H_
#include <iostream>
+#include <initializer_list>
#include <unordered_map>
#include <unordered_set>
#include <vector>
@@ -189,6 +190,18 @@ protected:
public:
/**
+ * Constructor of the ManagedContainer class with no owner (will contain
+ * rooted entries).
+ */
+ ManagedContainer() : owner(nullptr) {};
+
+ /**
+ * Constructor of the ManagedContainer class with an initializer list but
+ * no owner (will contain rooted entries).
+ */
+ ManagedContainer(std::initializer_list<T> l) : owner(nullptr), c(l) {};
+
+ /**
* Constructor of the ManagedContainer class.
*
* @param owner is the managed object which owns the collection and all