aboutsummaryrefslogtreecommitdiff
path: root/find-modules
diff options
context:
space:
mode:
authorShaheed Haque <srhaque@theiet.org>2017-02-03 20:22:52 +0000
committerStephen Kelly <steveire@gmail.com>2017-02-04 11:45:00 +0000
commit2e20aeab6e86670a66ff99a7b79120c4004b4d22 (patch)
tree9fc24f0411f90f623aa9842bd0aef9fdcccc52e6 /find-modules
parent98d065773413aba437c0bc537c701ed39d38a9b9 (diff)
downloadextra-cmake-modules-2e20aeab6e86670a66ff99a7b79120c4004b4d22.tar.gz
extra-cmake-modules-2e20aeab6e86670a66ff99a7b79120c4004b4d22.tar.bz2
Automatically mark classes with pure virtual functions as /Abstract/.
Diffstat (limited to 'find-modules')
-rw-r--r--find-modules/sip_generator.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/find-modules/sip_generator.py b/find-modules/sip_generator.py
index 55220e2f..1d807641 100644
--- a/find-modules/sip_generator.py
+++ b/find-modules/sip_generator.py
@@ -223,6 +223,8 @@ class SipGenerator(object):
if member.kind in [CursorKind.CXX_METHOD, CursorKind.FUNCTION_DECL, CursorKind.FUNCTION_TEMPLATE,
CursorKind.CONSTRUCTOR, CursorKind.DESTRUCTOR, CursorKind.CONVERSION_FUNCTION]:
decl = self._fn_get(container, member, level + 1)
+ if member.is_pure_virtual_method():
+ sip["annotations"].add("Abstract")
elif member.kind == CursorKind.ENUM_DECL:
decl = self._enum_get(container, member, level + 1) + ";\n"
elif member.kind == CursorKind.CXX_ACCESS_SPEC_DECL: