Shamrock
2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
shambase
src
term_colors.cpp
Go to the documentation of this file.
1
// -------------------------------------------------------//
2
//
3
// SHAMROCK code for hydrodynamics
4
// Copyright (c) 2021-2026 Timothée David--Cléris <tim.shamrock@proton.me>
5
// SPDX-License-Identifier: CeCILL Free Software License Agreement v2.1
6
// Shamrock is licensed under the CeCILL 2.1 License, see LICENSE for more information
7
//
8
// -------------------------------------------------------//
9
17
#include "
shambase/term_colors.hpp
"
18
19
namespace
shambase::details {
20
TermColors
_int_term_colors
=
TermColors::get_config_colors
();
21
}
22
23
void
shambase::term_colors::enable_colors
() {
24
details::_int_term_colors = details::TermColors::get_config_colors();
25
}
26
27
void
shambase::term_colors::disable_colors
() {
28
details::_int_term_colors = details::TermColors::get_config_nocolors();
29
}
shambase::details::TermColors
Struct representing the terminal colors to be used for printing.
Definition
term_colors.hpp:39
shambase::details::TermColors::get_config_colors
static TermColors get_config_colors()
Returns a TermColors struct with all colors enabled.
Definition
term_colors.hpp:81
term_colors.hpp
shambase::details::_int_term_colors
TermColors _int_term_colors
Global instance of TermColors.
Definition
term_colors.cpp:20
shambase::term_colors::disable_colors
void disable_colors()
Disable all colors.
Definition
term_colors.cpp:27
shambase::term_colors::enable_colors
void enable_colors()
Enable colors in logs.
Definition
term_colors.cpp:23
Generated on Wed May 13 2026 13:21:49 for Shamrock by
1.9.8