| |
- builtins.tuple(builtins.object)
-
- SourceTranslator
class SourceTranslator(builtins.tuple) |
|
SourceTranslator(rule: str = 'cc', output_extension: str = '.o', dest: pathlib.Path = PosixPath('$build_dir'))
A structure for keeping track of how source files become different types
of output files. |
|
- Method resolution order:
- SourceTranslator
- builtins.tuple
- builtins.object
Methods defined here:
- __getnewargs__(self)
- Return self as a plain tuple. Used by copy and pickle.
- __repr__(self)
- Return a nicely formatted representation string
- _asdict(self)
- Return a new dict which maps field names to their values.
- _replace(self, /, **kwds)
- Return a new SourceTranslator object replacing specified fields with new values
- output(self, path: pathlib.Path) -> pathlib.Path
- Get the output file from a given path.
- translate(self, path: pathlib.Path) -> pathlib.Path
- Translate a path by changing its suffix.
- write(self, stream: <class 'TextIO'>, out: pathlib.Path, source: str, rule: str = 'build', wasm: bool = False) -> None
- Write a ninja rule to the stream.
Class methods defined here:
- _make(iterable) from builtins.type
- Make a new SourceTranslator object from a sequence or iterable
Static methods defined here:
- __new__(_cls, rule: str = 'cc', output_extension: str = '.o', dest: pathlib.Path = PosixPath('$build_dir'))
- Create new instance of SourceTranslator(rule, output_extension, dest)
Readonly properties defined here:
- generated_header
- Determine if this translation produces a header file.
- gets_linked
- Determine if this source's output gets linked into a final image or
executable.
Data descriptors defined here:
- rule
- Alias for field number 0
- output_extension
- Alias for field number 1
- dest
- Alias for field number 2
Data and other attributes defined here:
- __annotations__ = {'dest': <class 'pathlib.Path'>, 'output_extension': <class 'str'>, 'rule': <class 'str'>}
- __match_args__ = ('rule', 'output_extension', 'dest')
- __orig_bases__ = (<function NamedTuple>,)
- _field_defaults = {'dest': PosixPath('$build_dir'), 'output_extension': '.o', 'rule': 'cc'}
- _fields = ('rule', 'output_extension', 'dest')
Methods inherited from builtins.tuple:
- __add__(self, value, /)
- Return self+value.
- __contains__(self, key, /)
- Return bool(key in self).
- __eq__(self, value, /)
- Return self==value.
- __ge__(self, value, /)
- Return self>=value.
- __getattribute__(self, name, /)
- Return getattr(self, name).
- __getitem__(self, key, /)
- Return self[key].
- __gt__(self, value, /)
- Return self>value.
- __hash__(self, /)
- Return hash(self).
- __iter__(self, /)
- Implement iter(self).
- __le__(self, value, /)
- Return self<=value.
- __len__(self, /)
- Return len(self).
- __lt__(self, value, /)
- Return self<value.
- __mul__(self, value, /)
- Return self*value.
- __ne__(self, value, /)
- Return self!=value.
- __rmul__(self, value, /)
- Return value*self.
- count(self, value, /)
- Return number of occurrences of value.
- index(self, value, start=0, stop=9223372036854775807, /)
- Return first index of value.
Raises ValueError if the value is not present.
Class methods inherited from builtins.tuple:
- __class_getitem__(...) from builtins.type
- See PEP 585
| |