diff options
Diffstat (limited to 'qface/idl')
-rw-r--r-- | qface/idl/domain.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/qface/idl/domain.py b/qface/idl/domain.py index b48d636..f717fbc 100644 --- a/qface/idl/domain.py +++ b/qface/idl/domain.py @@ -220,8 +220,13 @@ class TypeSymbol(NamedElement): @property def is_enum(self): - '''checks if type is complex and enum''' - return self.is_complex and isinstance(self.reference, Enum) + '''checks if type is complex and enum (or flag)''' + return self.is_complex and isinstance(self.reference, Enum) and self.reference.is_enum + + @property + def is_flag(self): + '''checks if type is an enum and reference is flag ''' + return self.is_enum and self.reference.is_flag @property def is_struct(self): |