-
Notifications
You must be signed in to change notification settings - Fork 23
QuantumGate::Console::SetOutput
Karel Donk edited this page Nov 18, 2018
·
4 revisions
Sets the output for the console.
static const bool SetOutput(const std::shared_ptr<Output>& output) noexcept;| Name | Description |
|---|---|
output |
A reference to a std::shared_ptr of an object derived from QuantumGate::Console::Output that will accept the console messages being sent to it. If this parameter is nullptr the console output is disabled. Note that a copy of the std::shared_ptr is stored by the console increasing the reference count to the shared Output object. If you want the object to be destroyed also make sure to set the console output back to nullptr or to a different Output object. |
Returns true if the operation succeeded, otherwise false.
// Sets output to an instance of QuantumGate::Console::WindowOutput
QuantumGate::Console::SetOutput(
std::make_shared<QuantumGate::Console::WindowOutput>());// Sets output to an instance of QuantumGate::Console::TerminalOutput
QuantumGate::Console::SetOutput(
std::make_shared<QuantumGate::Console::TerminalOutput>());