|
Porytiles
|
Functions | |
| fruit::Component< TextFormatter > | get_formatter_component (bool no_color) |
| Component that provides TextFormatter based on runtime configuration. | |
| fruit::Component< TextFormatter > porytiles2::di::get_formatter_component | ( | bool | no_color | ) |
Component that provides TextFormatter based on runtime configuration.
This component conditionally binds either AnsiStyledTextFormatter or PlainTextFormatter based on the no_color parameter. This demonstrates runtime conditional injection with Fruit DI.
Usage:
| no_color | If true, use PlainTextFormatter; otherwise use AnsiStyledTextFormatter |
Definition at line 10 of file components.cpp.