diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-25 18:48:12 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-25 18:48:12 +0100 |
commit | e8863235b93ff79cd68faf93e92140114bfa4ceb (patch) | |
tree | 2730a9c44dbeef24ebca5278d9aba4523fa710f8 /src/core/common/Rtti.hpp | |
parent | c36f476f434c16a52ada15bdfcc5f92bcad1b8db (diff) |
Added "setIntersection" method to Rtti class.
Diffstat (limited to 'src/core/common/Rtti.hpp')
-rw-r--r-- | src/core/common/Rtti.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/common/Rtti.hpp b/src/core/common/Rtti.hpp index 05cc728..f371494 100644 --- a/src/core/common/Rtti.hpp +++ b/src/core/common/Rtti.hpp @@ -403,6 +403,17 @@ public: static bool setIsOneOf(const RttiSet &s1, const RttiSet &s2); /** + * Calculates the intersection of two RttiSets. Only the elements of s1 + * which are at least one element in s2 are returned. + * + * @param s1 is the first set. For each type in this set we check whether + * it is one of the types in s2, only those elements are returned. + * @param s2 is the second set. + * @return s1 restricted to the types in s2. + */ + static RttiSet setIntersection(const RttiSet &s1, const RttiSet &s2); + + /** * Returns true if an instance of this type may have references to the other * given type. This mechanism is used to prune impossible paths when * resolving objects of a certain type by name in an object graph. |