libelemental 2.0.2
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Elemental::PropertyBase Class Reference

A property of the chemical elements. More...

#include <element.hh>

Inheritance diagram for Elemental::PropertyBase:
Inheritance graph
[legend]

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.
 

Detailed Description

A property of the chemical elements.

Member Function Documentation

◆ get_format()

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.

◆ is_colorable()

virtual bool Elemental::PropertyBase::is_colorable ( ) const
throw (
)
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 >.

◆ make_entry() [1/2]

void Elemental::PropertyBase::make_entry ( EntriesView view,
const ustring &  value 
) const
throw (
)

Adds a string representing a value for this property to an EntriesView.

Parameters
viewThe EntriesView to be populated.
valueThe value string to be added.

◆ make_entry() [2/2]

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.

Parameters
viewThe EntriesView to be populated.
valueThe value to be added.

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