libelemental 2.0.2
Elemental::color_value_base Class Referenceabstract

A base class for qualified values which have representative colors. More...

#include <value.hh>

Inheritance diagram for Elemental::color_value_base:

Public Member Functions

virtual color get_color () const throw () =0
 Returns a color representing the value.
Public Member Functions inherited from Elemental::value_base
bool has_value () const throw ()
virtual ustring get_string (const ustring &format=ustring()) const throw ()
 Returns a localized text representation of the value.
ustring get_tip () const throw ()
 Returns a localized message to be displayed as a tooltip.
void make_entry (EntriesView &view, const ustring &name, const ustring &format=ustring()) const throw ()
 Possibly adds the result of get_string() to an EntriesView.
virtual int compare (const value_base &other) const throw ()
 Compares two qualified values.

Protected Member Functions

 color_value_base (Qualifier qualifier) throw ()
Protected Member Functions inherited from Elemental::value_base
 value_base (Qualifier qualifier) throw ()
virtual ustring do_get_string (const ustring &format) const throw () =0
 Returns a localized text representation of a defined value.
virtual int compare_base (const value_base &other) const throw ()
 Compares the qualifications of two values.

Additional Inherited Members

Public Attributes inherited from Elemental::value_base
Qualifier qualifier
 The qualification of the value's meaning.
Protected Attributes inherited from Elemental::value_base
bool always
 Whether an undefined value should make an entry.
Static Protected Attributes inherited from Elemental::value_base
static const int YIELD_COMPARE

Detailed Description

A base class for qualified values which have representative colors.

Constructor & Destructor Documentation

◆ color_value_base()

Elemental::color_value_base::color_value_base ( Qualifier qualifier)
throw ( )
protected
Parameters
qualifierThe qualification of the initial value.

References color_value_base(), and Elemental::value_base::qualifier.

Referenced by color_value_base().

Member Function Documentation

◆ get_color()

virtual color Elemental::color_value_base::get_color ( ) const
throw ( )
pure virtual

Returns a color representing the value.

Derived classes must implement this function, returning a color that corresponds to the defined value. A special color should be returned if has_value() is false.

Returns
A color structure.

Implemented in Elemental::Block, Elemental::ColorValue, Elemental::LatticeType, Elemental::Phase, and Elemental::Series.


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