(self, config)
| 365 | class Protocol(object): |
| 366 | |
| 367 | def __init__(self, config): |
| 368 | self.config = config |
| 369 | self.json_api = {"domains": []} |
| 370 | self.source_set = set() |
| 371 | self.imported_domains = [] |
| 372 | self.exported_domains = [] |
| 373 | self.generate_domains = self.read_protocol_file(config.protocol.path) |
| 374 | |
| 375 | if config.protocol.options: |
| 376 | self.generate_domains = [rule.domain for rule in config.protocol.options] |
| 377 | self.exported_domains = [rule.domain for rule in config.protocol.options |
| 378 | if hasattr(rule, "exported")] |
| 379 | |
| 380 | if config.imported: |
| 381 | self.imported_domains = self.read_protocol_file(config.imported.path) |
| 382 | if config.imported.options: |
| 383 | self.imported_domains = [rule.domain |
| 384 | for rule in config.imported.options] |
| 385 | |
| 386 | self.patch_full_qualified_refs() |
| 387 | self.create_type_definitions() |
| 388 | self.generate_used_types() |
| 389 | |
| 390 | def read_protocol_file(self, file_name): |
| 391 | input_file = open(file_name, "r") |
nothing calls this directly
no test coverage detected