GCC Middle and Back End API Reference
text_art::style::color Struct Reference

#include <types.h>

Public Types

enum class  kind { NAMED , BITS_8 , BITS_24 }

Public Member Functions

 color (enum named_color name=named_color::DEFAULT, bool bright=false)
 color (uint8_t col_val)
 color (uint8_t r, uint8_t g, uint8_t b)
bool operator== (const color &other) const
bool operator!= (const color &other) const
void print_sgr (pretty_printer *pp, bool fg, bool &need_separator) const

Data Fields

enum text_art::style::color::kind m_kind
union { 
   struct { 
      enum named_color   m_name 
      bool   m_bright 
   }   m_named
   uint8_t   m_8bit 
   struct { 
      uint8_t   r 
      uint8_t   g 
      uint8_t   b 
   }   m_24bit
u

Member Enumeration Documentation

◆ kind

enum class text_art::style::color::kind
strong
Enumerator
NAMED 
BITS_8 
BITS_24 

Constructor & Destructor Documentation

◆ color() [1/3]

text_art::style::color::color ( enum named_color name = named_color::DEFAULT,
bool bright = false )
inline

References text_art::style::DEFAULT, m_kind, NAMED, and u.

Referenced by operator!=().

◆ color() [2/3]

text_art::style::color::color ( uint8_t col_val)
inline

References BITS_8, m_kind, and u.

◆ color() [3/3]

text_art::style::color::color ( uint8_t r,
uint8_t g,
uint8_t b )
inline

References b, BITS_24, g, m_kind, r, and u.

Member Function Documentation

◆ operator!=()

bool text_art::style::color::operator!= ( const color & other) const
inline

References color().

◆ operator==()

bool style::color::operator== ( const color & other) const
class text_art::style::color.   

References BITS_24, BITS_8, gcc_unreachable, m_kind, NAMED, and u.

◆ print_sgr()

Field Documentation

◆ b

uint8_t text_art::style::color::b

Referenced by color().

◆ g

uint8_t text_art::style::color::g

Referenced by color().

◆ [struct]

struct { ... } text_art::style::color::m_24bit

◆ m_8bit

uint8_t text_art::style::color::m_8bit

◆ m_bright

bool text_art::style::color::m_bright

◆ m_kind

enum text_art::style::color::kind text_art::style::color::m_kind

◆ m_name

enum named_color text_art::style::color::m_name

◆ [struct]

struct { ... } text_art::style::color::m_named

◆ r

uint8_t text_art::style::color::r

Referenced by color().

◆ [union]

union { ... } text_art::style::color::u

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