@throw std::invalid_argument if @c _in or @c out are invalid streams
| 43 | public: |
| 44 | /// @throw std::invalid_argument if @c _in or @c out are invalid streams |
| 45 | explicit CliFileSession(Cli& _cli, std::istream& _in=std::cin, std::ostream& _out=std::cout) : |
| 46 | CliSession(_cli, _out, 1), |
| 47 | exit(false), |
| 48 | in(_in) |
| 49 | { |
| 50 | if (!_in.good()) throw std::invalid_argument("istream invalid"); |
| 51 | if (!_out.good()) throw std::invalid_argument("ostream invalid"); |
| 52 | ExitAction( |
| 53 | [this](std::ostream&) noexcept |
| 54 | { |
| 55 | exit = true; |
| 56 | } |
| 57 | ); |
| 58 | } |
| 59 | void Start() |
| 60 | { |
| 61 | Enter(); |
nothing calls this directly
no outgoing calls
no test coverage detected