yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::cli::util::AnsiStyle Class Reference

#include <ansi_style.h>

Public Member Functions

constexpr AnsiStyle (bool enabled)
 
constexpr bool enabled () const
 
constexpr absl::string_view Heading () const
 
constexpr absl::string_view Highlight () const
 
constexpr absl::string_view Emphasis () const
 
constexpr absl::string_view Muted () const
 
constexpr absl::string_view Success () const
 
constexpr absl::string_view Failure () const
 
constexpr absl::string_view Reset () const
 

Static Public Member Functions

static AnsiStyle ForStream (std::FILE *stream)
 

Private Member Functions

constexpr absl::string_view Code (absl::string_view code) const
 

Private Attributes

bool enabled_
 

Detailed Description

Definition at line 12 of file ansi_style.h.

Constructor & Destructor Documentation

◆ AnsiStyle()

constexpr yaze::cli::util::AnsiStyle::AnsiStyle ( bool enabled)
inlineexplicitconstexpr

Definition at line 14 of file ansi_style.h.

Referenced by ForStream().

Member Function Documentation

◆ ForStream()

AnsiStyle yaze::cli::util::AnsiStyle::ForStream ( std::FILE * stream)
static

Definition at line 25 of file ansi_style.cc.

References AnsiStyle().

Referenced by yaze::cli::CommandRegistry::Execute().

Here is the call graph for this function:

◆ enabled()

constexpr bool yaze::cli::util::AnsiStyle::enabled ( ) const
inlineconstexpr

Definition at line 20 of file ansi_style.h.

References enabled_.

◆ Heading()

◆ Highlight()

constexpr absl::string_view yaze::cli::util::AnsiStyle::Highlight ( ) const
inlineconstexpr

Definition at line 23 of file ansi_style.h.

References Code().

Referenced by yaze::cli::CommandRegistry::GenerateCategoryHelp(), yaze::cli::CommandRegistry::GenerateHelp(), yaze::cli::Cli::PrintOverview(), and yaze::cli::RenderLogo().

Here is the call graph for this function:

◆ Emphasis()

constexpr absl::string_view yaze::cli::util::AnsiStyle::Emphasis ( ) const
inlineconstexpr

Definition at line 24 of file ansi_style.h.

References Code().

Referenced by yaze::cli::Cli::PrintOverview(), and yaze::cli::RenderLogo().

Here is the call graph for this function:

◆ Muted()

constexpr absl::string_view yaze::cli::util::AnsiStyle::Muted ( ) const
inlineconstexpr

Definition at line 25 of file ansi_style.h.

References Code().

Referenced by yaze::cli::RenderLogo().

Here is the call graph for this function:

◆ Success()

constexpr absl::string_view yaze::cli::util::AnsiStyle::Success ( ) const
inlineconstexpr

Definition at line 26 of file ansi_style.h.

References Code().

Referenced by yaze::cli::RenderLogo(), and anonymous_namespace{cli_main.cc}::RunSelfTest().

Here is the call graph for this function:

◆ Failure()

constexpr absl::string_view yaze::cli::util::AnsiStyle::Failure ( ) const
inlineconstexpr

Definition at line 27 of file ansi_style.h.

References Code().

Referenced by anonymous_namespace{cli_main.cc}::ReportFailure(), and anonymous_namespace{cli_main.cc}::RunSelfTest().

Here is the call graph for this function:

◆ Reset()

◆ Code()

constexpr absl::string_view yaze::cli::util::AnsiStyle::Code ( absl::string_view code) const
inlineconstexprprivate

Definition at line 31 of file ansi_style.h.

References enabled_.

Referenced by Emphasis(), Failure(), Heading(), Highlight(), Muted(), Reset(), and Success().

Member Data Documentation

◆ enabled_

bool yaze::cli::util::AnsiStyle::enabled_
private

Definition at line 35 of file ansi_style.h.

Referenced by Code(), and enabled().


The documentation for this class was generated from the following files: