aboutsummaryrefslogtreecommitdiffstats
path: root/qface/idl
diff options
context:
space:
mode:
authorJacques GUILLOU <jacques.guillou@pelagicore.com>2017-06-16 14:38:06 +0200
committerJacques GUILLOU <jacques.guillou@pelagicore.com>2017-06-16 14:38:06 +0200
commit5e1474acaf53781aa786fc33d5db90ca6e9fdac3 (patch)
treee151f24e8fa6f340c8fcd1dd2fd8ba4159850cdf /qface/idl
parentac7f9099e9d55f06ca5e0669015032978cedf489 (diff)
TypeSymbol: Add "is_interface" property
Diffstat (limited to 'qface/idl')
-rw-r--r--qface/idl/domain.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/qface/idl/domain.py b/qface/idl/domain.py
index bc45258..0db0979 100644
--- a/qface/idl/domain.py
+++ b/qface/idl/domain.py
@@ -217,6 +217,11 @@ class TypeSymbol(NamedElement):
return self.is_complex and isinstance(self.reference, Struct)
@property
+ def is_interface(self):
+ '''checks if type is interface'''
+ return self.is_complex and isinstance(self.reference, Interface)
+
+ @property
def is_variant(self):
'''checks if type is primitive and string'''
return self.is_primitive and self.name == 'var'