My Project
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Attributes | Friends | List of all members
osl::record::Color Class Reference

カラーコードを保持するクラス。 More...

#include <kanjiPrint.h>

Public Member Functions

 Color ()
 
 Color (const std::string &value, const std::string &name, const bool valid=true)
 
 ~Color ()
 
bool isValid () const
 
const std::string & getName () const
 
bool operator== (const Color &rhs) const
 
bool operator!= (const Color &rhs) const
 

Static Public Member Functions

static const Color colorFor (const std::string &str)
 文字列に対応するColor objectを返す
 

Static Public Attributes

static const Color NONE
 色指定しない(デフォルトのまま)ことを示す特別なオブジェクト
 
static const Color Black
 
static const Color Red
 
static const Color Green
 
static const Color Brown
 
static const Color Blue
 
static const Color Purple
 
static const Color Cyan
 
static const Color LightGray
 
static const Color DarkGray
 
static const Color LightRed
 
static const Color LightGreen
 
static const Color Yellow
 
static const Color LightBlue
 
static const Color LightPurple
 
static const Color LightCyan
 
static const Color White
 

Private Attributes

std::string value
 
std::string name
 
bool valid
 

Friends

std::ostream & operator<< (std::ostream &os, const Color &c)
 

Detailed Description

カラーコードを保持するクラス。

Definition at line 22 of file kanjiPrint.h.

Constructor & Destructor Documentation

◆ Color() [1/2]

osl::record::Color::Color ( )
inline

Definition at line 25 of file kanjiPrint.h.

◆ Color() [2/2]

osl::record::Color::Color ( const std::string &  value,
const std::string &  name,
const bool  valid = true 
)

Definition at line 60 of file kanjiPrint.cc.

◆ ~Color()

osl::record::Color::~Color ( )

Definition at line 64 of file kanjiPrint.cc.

Member Function Documentation

◆ colorFor()

const osl::record::Color osl::record::Color::colorFor ( const std::string &  str)
static

文字列に対応するColor objectを返す

Definition at line 39 of file kanjiPrint.cc.

References Black, Blue, Brown, caseInsentiveCompare(), Cyan, DarkGray, Green, LightBlue, LightCyan, LightGray, LightGreen, LightPurple, LightRed, NONE, Purple, Red, White, and Yellow.

◆ getName()

const std::string & osl::record::Color::getName ( ) const
inline

Definition at line 34 of file kanjiPrint.h.

References name.

◆ isValid()

bool osl::record::Color::isValid ( ) const
inline

Definition at line 33 of file kanjiPrint.h.

References valid.

◆ operator!=()

bool osl::record::Color::operator!= ( const Color rhs) const
inline

Definition at line 40 of file kanjiPrint.h.

◆ operator==()

bool osl::record::Color::operator== ( const Color rhs) const
inline

Definition at line 35 of file kanjiPrint.h.

References valid, and value.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const Color c 
)
friend

Member Data Documentation

◆ Black

const osl::record::Color osl::record::Color::Black
static

Definition at line 53 of file kanjiPrint.h.

Referenced by colorFor().

◆ Blue

const osl::record::Color osl::record::Color::Blue
static

Definition at line 57 of file kanjiPrint.h.

Referenced by colorFor().

◆ Brown

const osl::record::Color osl::record::Color::Brown
static

Definition at line 56 of file kanjiPrint.h.

Referenced by colorFor().

◆ Cyan

const osl::record::Color osl::record::Color::Cyan
static

Definition at line 59 of file kanjiPrint.h.

Referenced by colorFor().

◆ DarkGray

const osl::record::Color osl::record::Color::DarkGray
static

Definition at line 61 of file kanjiPrint.h.

Referenced by colorFor().

◆ Green

const osl::record::Color osl::record::Color::Green
static

Definition at line 55 of file kanjiPrint.h.

Referenced by colorFor().

◆ LightBlue

const osl::record::Color osl::record::Color::LightBlue
static

Definition at line 65 of file kanjiPrint.h.

Referenced by colorFor().

◆ LightCyan

const osl::record::Color osl::record::Color::LightCyan
static

Definition at line 67 of file kanjiPrint.h.

Referenced by colorFor().

◆ LightGray

const osl::record::Color osl::record::Color::LightGray
static

Definition at line 60 of file kanjiPrint.h.

Referenced by colorFor().

◆ LightGreen

const osl::record::Color osl::record::Color::LightGreen
static

Definition at line 63 of file kanjiPrint.h.

Referenced by colorFor().

◆ LightPurple

const osl::record::Color osl::record::Color::LightPurple
static

Definition at line 66 of file kanjiPrint.h.

Referenced by colorFor().

◆ LightRed

const osl::record::Color osl::record::Color::LightRed
static

Definition at line 62 of file kanjiPrint.h.

Referenced by colorFor().

◆ name

std::string osl::record::Color::name
private

Definition at line 30 of file kanjiPrint.h.

Referenced by getName().

◆ NONE

const osl::record::Color osl::record::Color::NONE
static

色指定しない(デフォルトのまま)ことを示す特別なオブジェクト

Definition at line 52 of file kanjiPrint.h.

Referenced by colorFor().

◆ Purple

const osl::record::Color osl::record::Color::Purple
static

Definition at line 58 of file kanjiPrint.h.

Referenced by colorFor().

◆ Red

const osl::record::Color osl::record::Color::Red
static

Definition at line 54 of file kanjiPrint.h.

Referenced by colorFor().

◆ valid

bool osl::record::Color::valid
private

Definition at line 31 of file kanjiPrint.h.

Referenced by isValid(), and operator==().

◆ value

std::string osl::record::Color::value
private

Definition at line 29 of file kanjiPrint.h.

Referenced by osl::record::operator<<(), and operator==().

◆ White

const osl::record::Color osl::record::Color::White
static

Definition at line 68 of file kanjiPrint.h.

Referenced by colorFor().

◆ Yellow

const osl::record::Color osl::record::Color::Yellow
static

Definition at line 64 of file kanjiPrint.h.

Referenced by colorFor().


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