summaryrefslogtreecommitdiff
path: root/src/core/common/Rtti.cpp
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-01-23 00:30:44 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-01-23 00:30:44 +0100
commitef59091033b3f69dd01df009f21927b8ad81f5a9 (patch)
tree94bcc065d5ef4a1438a985f715a341ccc66acb53 /src/core/common/Rtti.cpp
parent887244db14f00063ebd429a8535fb204a96bee4e (diff)
Improved documentation and added "isOneOf" function to Rtti class.
Diffstat (limited to 'src/core/common/Rtti.cpp')
-rw-r--r--src/core/common/Rtti.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/common/Rtti.cpp b/src/core/common/Rtti.cpp
index 1213669..668e418 100644
--- a/src/core/common/Rtti.cpp
+++ b/src/core/common/Rtti.cpp
@@ -125,6 +125,17 @@ bool Rtti::isa(const Rtti &other) const
return parents.count(&other) > 0;
}
+bool Rtii::isOneOf(const RttiSet &others) const
+{
+ initialize();
+ for (const Rtti *other: others) {
+ if (parents.count(other) > 0) {
+ return true;
+ }
+ }
+ return false;
+}
+
bool Rtti::composedOf(const Rtti &other) const
{
initialize();