(self, name, source_targets, ps)
| 34 | class CastTargetClass(targets.TypedTarget): |
| 35 | |
| 36 | def construct(self, name, source_targets, ps): |
| 37 | assert isinstance(name, basestring) |
| 38 | assert is_iterable_typed(source_targets, virtual_target.VirtualTarget) |
| 39 | assert isinstance(ps, property_set.PropertySet) |
| 40 | |
| 41 | result = [] |
| 42 | for s in source_targets: |
| 43 | if not isinstance(s, virtual_target.FileTarget): |
| 44 | get_manager().errors()("Source to the 'cast' metatager is not a file") |
| 45 | |
| 46 | if s.action(): |
| 47 | get_manager().errors()("Only non-derived targets allowed as sources for 'cast'.") |
| 48 | |
| 49 | |
| 50 | r = s.clone_with_different_type(self.type()) |
| 51 | result.append(get_manager().virtual_targets().register(r)) |
| 52 | |
| 53 | return property_set.empty(), result |
| 54 | |
| 55 | @bjam_signature((["name", "type"], ["sources", "*"], ["requirements", "*"], |
| 56 | ["default_build", "*"], ["usage_requirements", "*"])) |
nothing calls this directly
no test coverage detected