| 1799 | |
| 1800 | |
| 1801 | class PBXBuildFile(XCObject): |
| 1802 | _schema = XCObject._schema.copy() |
| 1803 | _schema.update( |
| 1804 | { |
| 1805 | "fileRef": [0, XCFileLikeElement, 0, 1], |
| 1806 | "settings": [0, str, 0, 0], # hack, it's a dict |
| 1807 | } |
| 1808 | ) |
| 1809 | |
| 1810 | # Weird output rules for PBXBuildFile. |
| 1811 | _should_print_single_line = True |
| 1812 | _encode_transforms = XCObject._alternate_encode_transforms |
| 1813 | |
| 1814 | def Name(self): |
| 1815 | # Example: "main.cc in Sources" |
| 1816 | return self._properties["fileRef"].Name() + " in " + self.parent.Name() |
| 1817 | |
| 1818 | def Hashables(self): |
| 1819 | # super |
| 1820 | hashables = XCObject.Hashables(self) |
| 1821 | |
| 1822 | # It is not sufficient to just rely on Name() to get the |
| 1823 | # XCFileLikeElement's name, because that is not a complete pathname. |
| 1824 | # PathHashables returns hashables unique enough that no two |
| 1825 | # PBXBuildFiles should wind up with the same set of hashables, unless |
| 1826 | # someone adds the same file multiple times to the same target. That |
| 1827 | # would be considered invalid anyway. |
| 1828 | hashables.extend(self._properties["fileRef"].PathHashables()) |
| 1829 | |
| 1830 | return hashables |
| 1831 | |
| 1832 | |
| 1833 | class XCBuildPhase(XCObject): |
no test coverage detected