89 _normalize = re.compile(r"""[ \t]{2,}""").sub |
89 _normalize = re.compile(r"""[ \t]{2,}""").sub |
90 |
90 |
91 _modules = {} # cache of modules we've seen |
91 _modules = {} # cache of modules we've seen |
92 |
92 |
93 |
93 |
|
94 def clearModulesCache(): |
|
95 """ |
|
96 Function to clear the cached modules. |
|
97 """ |
|
98 _modules.clear() |
|
99 |
|
100 |
94 class VisibilityMixin(ClbrBaseClasses.ClbrVisibilityMixinBase): |
101 class VisibilityMixin(ClbrBaseClasses.ClbrVisibilityMixinBase): |
95 """ |
102 """ |
96 Mixin class implementing the notion of visibility. |
103 Mixin class implementing the notion of visibility. |
97 """ |
104 """ |
98 |
105 |
199 annotation="-> {0}".format(returns), |
206 annotation="-> {0}".format(returns), |
200 ) |
207 ) |
201 VisibilityMixin.__init__(self) |
208 VisibilityMixin.__init__(self) |
202 |
209 |
203 |
210 |
204 def readmodule_ex(module, path=None): |
211 def readmodule_ex(module, path=None, isTypeFile=False): |
205 """ |
212 """ |
206 Read a ProtoBuf protocol file and return a dictionary of messages, enums, |
213 Read a ProtoBuf protocol file and return a dictionary of messages, enums, |
207 services and rpc methods. |
214 services and rpc methods. |
208 |
215 |
209 @param module name of the ProtoBuf protocol file |
216 @param module name of the ProtoBuf protocol file |
210 @type str |
217 @type str |
211 @param path path the file should be searched in |
218 @param path path the file should be searched in |
212 @type list of str |
219 @type list of str |
|
220 @param isTypeFile flag indicating a file of this type |
|
221 @type bool |
213 @return the resulting dictionary |
222 @return the resulting dictionary |
214 @rtype dict |
223 @rtype dict |
215 """ |
224 """ |
216 global _modules |
225 global _modules |
217 |
226 |