diff options
author | Juergen Bocklage-Ryannel <jbocklage-ryannel@luxoft.com> | 2018-01-24 11:45:33 +0100 |
---|---|---|
committer | Juergen Bocklage-Ryannel <jbocklage-ryannel@luxoft.com> | 2018-01-24 11:45:33 +0100 |
commit | cf676a4340f64f6a5b9f38b4e2bd3401c6d57d47 (patch) | |
tree | 0dab03a7c79cecf98c468ebce8e3a68bcfa938ae /qface/idl | |
parent | 58b695f9c4b609a027d595398a1660625b49682a (diff) |
added depencies detection support for symbols.
See symbol.dependencies. It returns a list of TypeSymbol. There are
filters in the qtcpp helpers which make use of these dependencies.
The idea is that we can generate header includes and source includes
for the individual C++ documents.
Diffstat (limited to 'qface/idl')
-rw-r--r-- | qface/idl/domain.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/qface/idl/domain.py b/qface/idl/domain.py index 75a2950..e82aeb3 100644 --- a/qface/idl/domain.py +++ b/qface/idl/domain.py @@ -124,6 +124,7 @@ class Symbol(NamedElement): self._tags = dict() self._contentMap = ChainMap() + self._dependencies = set() self.type = TypeSymbol('', self) self.kind = self.__class__.__name__.lower() """ the associated type information """ @@ -162,6 +163,12 @@ class Symbol(NamedElement): """ return general list of symbol contents """ return self._contentMap.values() + @property + def dependencies(self): + if not self._dependencies: + self._dependencies = [x.type for x in self.contents] + return self._dependencies + def toJson(self): o = super().toJson() if self.type.is_valid: |