summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-16 11:57:46 +0100
committerBenjamin Paassen <bpaassen@techfak.uni-bielefeld.de>2015-01-16 11:57:46 +0100
commit0b76b4943b53b7b42500f15afc45f7eb38d8734b (patch)
tree7ca9146045f9dc4274e4ffa8cdfc9dfd1a40e834
parentfae1b7a4eafbd9872d2447eab011bdf9aab97645 (diff)
added getUid() method to Managed.
-rw-r--r--src/core/managed/Managed.hpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/managed/Managed.hpp b/src/core/managed/Managed.hpp
index dd1a23a..48198c2 100644
--- a/src/core/managed/Managed.hpp
+++ b/src/core/managed/Managed.hpp
@@ -94,6 +94,14 @@ public:
Manager &getManager() { return mgr; }
/**
+ * Returns the unique identifier (UID) of this object. Valid UIDs are
+ * positive non-zero values.
+ *
+ * @return the unique id of the object.
+ */
+ ManagedUid getUid() { return mgr.getUid(this); }
+
+ /**
* Acquires a reference to the object wraped in the given handle -- creates
* a new Owned handle instance with this Managed instance as owner and the
* given object handle as the referenced object.
@@ -151,8 +159,7 @@ public:
* object. The event id must be used when unregistering event handlers.
*/
EventId registerEvent(EventType type, EventHandler handler,
- Handle<Managed> owner,
- void *data = nullptr);
+ Handle<Managed> owner, void *data = nullptr);
/**
* Unregisters the event handler with the given signature.