diff options
Diffstat (limited to 'src/core/managed')
-rw-r--r-- | src/core/managed/Managed.cpp | 5 | ||||
-rw-r--r-- | src/core/managed/Managed.hpp | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/src/core/managed/Managed.cpp b/src/core/managed/Managed.cpp index 341e0d0..cede819 100644 --- a/src/core/managed/Managed.cpp +++ b/src/core/managed/Managed.cpp @@ -80,4 +80,9 @@ bool Managed::triggerEvent(Event &ev) { return mgr.triggerEvent(this, ev); } const RttiBase &Managed::type() const { return typeOf(*this); } bool Managed::isa(const RttiBase &t) const { return type().isa(t); } + +bool Managed::aggregatedOf(const RttiBase &t) const +{ + return type().aggregatedOf(t); +} } diff --git a/src/core/managed/Managed.hpp b/src/core/managed/Managed.hpp index cdf81aa..fecbfdd 100644 --- a/src/core/managed/Managed.hpp +++ b/src/core/managed/Managed.hpp @@ -199,13 +199,23 @@ public: const RttiBase &type() const; /** - * Returns true if this Managed instance is of the given RttiBase. + * Returns true if this Managed instance is of the type described by the + * given RttiBase instance. * * @param true if the RttiBase registered for this particular Managed * class is of the given type or one of the registered parent types is of * the given type. */ bool isa(const RttiBase &t) const; + + /** + * Returns true if this Managed instance may contain instances of the type + * described by the given RttiBase instance. + * + * @param true if the RttiBase registered for this particular Managed class + * may contain instance of the given type. + */ + bool aggregatedOf(const RttiBase &t) const; }; /** |