|
libelemental
2.0.0
|
A qualified value representing a periodic table block. More...
#include <value-types.hh>

Public Types | |
| enum | Value { S, P, D, F } |
| The possible lattice type values. More... | |
Public Member Functions | |
| Block (const Value &source, Qualifier qualifier=Q_NEUTRAL) throw () | |
| Constructs a new defined block. More... | |
| Block (Qualifier qualifier=Q_UNK) throw () | |
| Constructs a new undefined or default block. More... | |
| virtual int | compare (const value_base &other) const throw () |
| Compares two qualified values. More... | |
| virtual color | get_color () const throw () |
| Returns a color representing the value. More... | |
Public Member Functions inherited from Elemental::value_base | |
| bool | has_value () const throw () |
| Returns whether the value is defined. More... | |
| virtual ustring | get_string (const ustring &format=ustring()) const throw () |
| Returns a localized text representation of the value. More... | |
| ustring | get_tip () const throw () |
| Returns a localized message to be displayed as a tooltip. More... | |
| void | make_entry (EntriesView &view, const ustring &name, const ustring &format=ustring()) const throw () |
| Possibly adds the result of get_string() to an EntriesView. More... | |
Public Attributes | |
| Value | value |
| The value, if defined. | |
Public Attributes inherited from Elemental::value_base | |
| Qualifier | qualifier |
| The qualification of the value's meaning. | |
Protected Member Functions | |
| virtual ustring | do_get_string (const ustring &format) const throw () |
| Returns a localized text representation of a defined value. More... | |
Protected Member Functions inherited from Elemental::color_value_base | |
| color_value_base (Qualifier qualifier) throw () | |
Protected Member Functions inherited from Elemental::value_base | |
| value_base (Qualifier qualifier) throw () | |
| virtual int | compare_base (const value_base &other) const throw () |
| Compares the qualifications of two values. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Elemental::value_base | |
| bool | always |
| Whether an undefined value should make an entry. More... | |
Static Protected Attributes inherited from Elemental::value_base | |
| static const int | YIELD_COMPARE |
| Indicates that comparison should be based on values, not definedness. More... | |
A qualified value representing a periodic table block.
Constructs a new defined block.
| source | The initial definition. |
| qualifier | The qualification of the initial value. |
Constructs a new undefined or default block.
| qualifier | The qualification of the initial value. |
|
virtual | ||||||||||||||
Compares two qualified values.
Derived classes may override this function, first calling compare_base, and use a dynamic_cast to check other.
| other | The qualified value for comparison. |
-1 if this value is undefined or is less than other; 0 if the values are equal; or 1 if other is undefined or this value is greater than other. Reimplemented from Elemental::value_base.
|
protectedvirtual | ||||||||||||||
Returns a localized text representation of a defined value.
Derived classes must implement this function to produce a text representation based on the format. It will be called by get_string(), which will then decorate its output as appropriate for the current qualifier. If has_value() is false, the behavior is undefined.
| format | A compose-style format string. Derived classes may define the number of argument references expected in the string; the default is one. If format is empty, a minimal default should be used. |
Implements Elemental::value_base.
|
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.
Implements Elemental::color_value_base.
1.8.17