diff options
author | Stephen Kelly <steveire@gmail.com> | 2017-01-13 18:06:28 +0000 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2017-01-13 18:06:28 +0000 |
commit | 8cf274317b437717f7e114e463de0652b973841b (patch) | |
tree | 13a8aaad17182a5abd29a7774a3f55a093c600b6 /tests/GenerateSipBindings/rules_SipTest.py | |
parent | af9f502f9629766130e171632d2072d563661959 (diff) | |
download | extra-cmake-modules-8cf274317b437717f7e114e463de0652b973841b.tar.gz extra-cmake-modules-8cf274317b437717f7e114e463de0652b973841b.tar.bz2 |
Bindings: Add rules engine for typedefs
Currently this is rather simple, allowing only matching typedefs by
name. If we need more later, we can extend the interface. This will
make it possible to add bindings for the K18n framework.
Diffstat (limited to 'tests/GenerateSipBindings/rules_SipTest.py')
-rw-r--r-- | tests/GenerateSipBindings/rules_SipTest.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/GenerateSipBindings/rules_SipTest.py b/tests/GenerateSipBindings/rules_SipTest.py index 1331da41..73c5451b 100644 --- a/tests/GenerateSipBindings/rules_SipTest.py +++ b/tests/GenerateSipBindings/rules_SipTest.py @@ -9,6 +9,12 @@ def local_function_rules(): return [ ["MyObject", "fwdDecl", ".*", ".*", ".*", rules_engine.function_discard], ["MyObject", "fwdDeclRef", ".*", ".*", ".*", rules_engine.function_discard], + ["TypedefUser", "setTagPattern", ".*", ".*", ".*", rules_engine.function_discard], + ] + +def local_typedef_rules(): + return [ + [".*", "TagFormatter", rules_engine.typedef_discard], ] def methodGenerator(function, sip, entry): @@ -23,6 +29,7 @@ class RuleSet(Qt5Ruleset.RuleSet): def __init__(self): Qt5Ruleset.RuleSet.__init__(self) self._fn_db = rules_engine.FunctionRuleDb(lambda: local_function_rules() + Qt5Ruleset.function_rules()) + self._typedef_db = rules_engine.TypedefRuleDb(lambda: local_typedef_rules() + Qt5Ruleset.typedef_rules()) self._modulecode = rules_engine.ModuleCodeDb({ "cpplib.h": { "code": """ |