This class is a facade to the Boost.Build system. It serves as the root to access all data structures in use.
| 11 | return the_manager |
| 12 | |
| 13 | class Manager: |
| 14 | """ This class is a facade to the Boost.Build system. |
| 15 | It serves as the root to access all data structures in use. |
| 16 | """ |
| 17 | |
| 18 | def __init__ (self, engine, global_build_dir): |
| 19 | """ Constructor. |
| 20 | engine: the build engine that will actually construct the targets. |
| 21 | """ |
| 22 | from build.virtual_target import VirtualTargetRegistry |
| 23 | from build.targets import TargetRegistry |
| 24 | from build.project import ProjectRegistry |
| 25 | from build.scanner import ScannerRegistry |
| 26 | from build.errors import Errors |
| 27 | from b2.util.logger import NullLogger |
| 28 | from build import build_request, property_set, feature |
| 29 | |
| 30 | self.engine_ = engine |
| 31 | self.virtual_targets_ = VirtualTargetRegistry (self) |
| 32 | self.projects_ = ProjectRegistry (self, global_build_dir) |
| 33 | self.targets_ = TargetRegistry () |
| 34 | self.logger_ = NullLogger () |
| 35 | self.scanners_ = ScannerRegistry (self) |
| 36 | self.argv_ = bjam.variable("ARGV") |
| 37 | self.boost_build_path_ = bjam.variable("BOOST_BUILD_PATH") |
| 38 | self.errors_ = Errors() |
| 39 | self.command_line_free_features_ = property_set.empty() |
| 40 | |
| 41 | global the_manager |
| 42 | the_manager = self |
| 43 | |
| 44 | def scanners (self): |
| 45 | return self.scanners_ |
| 46 | |
| 47 | def engine (self): |
| 48 | return self.engine_ |
| 49 | |
| 50 | def virtual_targets (self): |
| 51 | return self.virtual_targets_ |
| 52 | |
| 53 | def targets (self): |
| 54 | return self.targets_ |
| 55 | |
| 56 | def projects (self): |
| 57 | return self.projects_ |
| 58 | |
| 59 | def argv (self): |
| 60 | return self.argv_ |
| 61 | |
| 62 | def logger (self): |
| 63 | return self.logger_ |
| 64 | |
| 65 | def set_logger (self, logger): |
| 66 | self.logger_ = logger |
| 67 | |
| 68 | def errors (self): |
| 69 | return self.errors_ |
| 70 |