summaryrefslogtreecommitdiff
path: root/src/core/managed/Managed.hpp
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2014-12-20 00:16:37 +0100
committerAndreas Stöckel <andreas@somweyr.de>2014-12-20 00:16:37 +0100
commit04248309bdedb58be2fe1aa1fad0342ac936b541 (patch)
treede8663198fad53b0bbca3b774b1abd1e4c4cbad2 /src/core/managed/Managed.hpp
parentee5a821286c48388a900c12b7c03190bed9b1f25 (diff)
improved RTTI system
Diffstat (limited to 'src/core/managed/Managed.hpp')
-rw-r--r--src/core/managed/Managed.hpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/core/managed/Managed.hpp b/src/core/managed/Managed.hpp
index 4818c3d..cc55ae0 100644
--- a/src/core/managed/Managed.hpp
+++ b/src/core/managed/Managed.hpp
@@ -114,19 +114,19 @@ public:
* @return a reference to the registered ManagedType for this particular
* Managed class.
*/
- const ManagedType& type() const {
- return ManagedType::typeOf(typeid(*this));
+ const ManagedType &type() const
+ {
+ return ManagedType::typeOf(*this);
}
/**
* Returns true if this Managed instance is of the given ManagedType.
*
* @param true if the ManagedType registered for this particular Managed
- * class is
+ * class is of the given type or one of the registered parent types is of
+ * the given type.
*/
- bool isa(const ManagedType &t) const {
- return type().isa(t);
- }
+ bool isa(const ManagedType &t) const { return type().isa(t); }
};
/**
@@ -512,7 +512,6 @@ public:
*/
Managed *getOwner() const { return owner; }
};
-
}
#endif /* _OUSIA_MANAGED_HPP_ */