xtd
1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
xtd.core
include
xtd
foreground_color.hpp
Go to the documentation of this file.
1
4
#pragma once
5
#include "
console.hpp
"
6
#include "
object.hpp
"
7
9
namespace
xtd
{
20
class
foreground_color
final :
public
object
{
21
public
:
23
31
explicit
foreground_color
(
console_color
color) : color_(color) {}
33
35
friend
auto
operator <<(std::ostream& os,
const
foreground_color
& color) -> std::ostream& {
36
if
(!
console::is_output_redirected
() && os.rdbuf() ==
console::out
.rdbuf())
37
console::foreground_color
(color.color_);
38
return
os;
39
}
41
42
private
:
43
console_color
color_;
44
};
45
}
xtd::console::foreground_color
static auto foreground_color() -> console_color
Gets the foreground color of the console.
xtd::console::out
static std::ostream out
Gets the standard output stream. A std::basic_ostream<char_t> that represents the standard output str...
Definition
console.hpp:52
xtd::console::is_output_redirected
static auto is_output_redirected() -> bool
Gets a value that indicates whether the output stream has been redirected from the standard output st...
xtd::foreground_color
Represent foreground color output manipulator class.
Definition
foreground_color.hpp:20
xtd::foreground_color::foreground_color
foreground_color(console_color color)
Sets the foreground color of the console.
Definition
foreground_color.hpp:31
xtd::object::object
object()=default
Create a new instance of the ultimate base class object.
console.hpp
Contains xtd::console class.
xtd::console_color
console_color
Specifies constants that define foreground and background colors for the console.
Definition
console_color.hpp:20
xtd
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition
abstract_object.hpp:8
object.hpp
Contains xtd::object class.
Generated on
for xtd by
Gammasoft
. All rights reserved.