libelemental 2.0.2
|
A property of the chemical elements. More...
#include <element.hh>
Public Member Functions | |
PropertyBase (const Message &name, const Message &format, const Message &description, const Message *sources[]) throw () | |
ustring | get_name () const throw () |
Returns the translated name of the property. | |
bool | has_format () const throw () |
Returns whether a compose-style format for values is defined. | |
ustring | get_format () const throw () |
Returns a translated compose-style format for values of the property. | |
ustring | get_description () const throw () |
Returns a translated explanatory description of the property. | |
void | make_entry (EntriesView &view, const value_base &value) const throw () |
Possibly adds a value for this property to an EntriesView. | |
void | make_entry (EntriesView &view, const ustring &value) const throw () |
Adds a string representing a value for this property to an EntriesView. | |
virtual bool | is_colorable () const throw () |
Returns whether values of the property have color representations. | |
Public Attributes | |
std::list< const Message * > | sources |
Citations for the sources of values for the property. | |
Protected Attributes | |
Message | name |
The untranslated name of the property. | |
Message | format |
An untranslated compose-style format for values of the property. | |
Message | description |
An untranslated explanatory description of the property. | |
A property of the chemical elements.
ustring Elemental::PropertyBase::get_format | ( | ) | const | |
throw | ( | |||
) |
Returns a translated compose-style format for values of the property.
If the format is undefined, returns the empty string.
|
virtual |
Returns whether values of the property have color representations.
If true
, values may or may not be color_value_base descendants.
Reimplemented in Elemental::Property< Float >.
void Elemental::PropertyBase::make_entry | ( | EntriesView & | view, |
const ustring & | value | ||
) | const | ||
throw | ( | ||
) |
Adds a string representing a value for this property to an EntriesView.
view | The EntriesView to be populated. |
value | The value string to be added. |
void Elemental::PropertyBase::make_entry | ( | EntriesView & | view, |
const value_base & | value | ||
) | const | ||
throw | ( | ||
) |
Possibly adds a value for this property to an EntriesView.
An entry will only be made if the value is defined or if its always
is true
.
view | The EntriesView to be populated. |
value | The value to be added. |