xtd 0.2.0
Loading...
Searching...
No Matches
reset_color.h
Go to the documentation of this file.
1
4#pragma once
5#include "console.h"
6#include "object.h"
7
9namespace xtd {
20 class reset_color final : public object {
21 public:
23
29 reset_color() = default;
31
33 friend std::ostream& operator <<(std::ostream& os, const reset_color&) {
34 if (!console::is_output_redirected() && os.rdbuf() == console::out.rdbuf())
36 return os;
37 }
39 };
40}
static std::ostream out
Gets the standard output stream. A std::basic_ostream<char_t> that represents the standard output str...
Definition console.h:52
static bool reset_color()
Sets the foreground and background console colors to their defaults.
static bool is_output_redirected()
Gets a value that indicates whether the output stream has been redirected from the standard output st...
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:42
Represent reset color output manipulator class.
Definition reset_color.h:20
reset_color()=default
Initialize a new insttance of xtd::reset_coloor class.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::object class.
Contains xtd::console class.