From 2ed3e09b30357cbab2137056d51caf6bac3f48c6 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Wed, 14 Jan 2015 22:04:55 +0100 Subject: Added RttiType::hasProperty and RttiType::hasMethod function --- src/core/common/Rtti.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/core/common/Rtti.cpp') diff --git a/src/core/common/Rtti.cpp b/src/core/common/Rtti.cpp index 239f2b4..6809911 100644 --- a/src/core/common/Rtti.cpp +++ b/src/core/common/Rtti.cpp @@ -161,6 +161,16 @@ std::shared_ptr RttiType::getProperty(const std::string &nam return it->second; } +bool RttiType::hasMethod(const std::string &name) const +{ + return methods.count(name) > 0; +} + +bool RttiType::hasProperty(const std::string &name) const +{ + return properties.count(name) > 0; +} + /* Constant initialization */ namespace RttiTypes { -- cgit v1.2.3