Elemental::Series Class Reference

A qualified value representing a chemical series. More...

#include <value-types.hh>

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

List of all members.

Public Types

enum  Value {
  NONMETAL,
  NOBLE_GAS,
  ALKALI_METAL,
  ALKALINE_EARTH_METAL,
  SEMIMETAL,
  HALOGEN,
  POST_TRANSITION_METAL,
  TRANSITION_METAL,
  LANTHANIDE,
  ACTINIDE
}
 

The possible chemical series values.

More...

Public Member Functions

 Series (const Value &source, Qualifier qualifier=Q_NEUTRAL) throw ()
 Constructs a new defined series.
 Series (Qualifier qualifier=Q_UNK) throw ()
 Constructs a new undefined or default series.
virtual int compare (const value_base &other) const throw ()
virtual color get_color () const throw ()
 Returns a color representing the value.

Public Attributes

Value value
 The value, if defined.

Protected Member Functions

virtual ustring do_get_string (const ustring &format) const throw ()
 Returns a localized text representation of a defined value.

Detailed Description

A qualified value representing a chemical series.


Member Enumeration Documentation

The possible chemical series values.

Enumerator:
NONMETAL 

nonmetals

NOBLE_GAS 

noble gases

ALKALI_METAL 

alkali metals

ALKALINE_EARTH_METAL 

alkaline earth metals

SEMIMETAL 

semimetals

HALOGEN 

halogens

POST_TRANSITION_METAL 

post-transition metals

TRANSITION_METAL 

transition metals

LANTHANIDE 

lanthanides

ACTINIDE 

actinides


Constructor & Destructor Documentation

Elemental::Series::Series ( const Value source,
Qualifier  qualifier = Q_NEUTRAL 
) throw ()

Constructs a new defined series.

Parameters:
source The initial definition.
qualifier The qualification of the initial value.
Elemental::Series::Series ( Qualifier  qualifier = Q_UNK  )  throw ()

Constructs a new undefined or default series.

Parameters:
qualifier The qualification of the initial value.

Member Function Documentation

virtual ustring Elemental::Series::do_get_string ( const ustring &  format  )  const throw () [protected, virtual]

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.

Parameters:
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.
Returns:
A UTF-8 string containing the localized representation.

Implements Elemental::value_base.

virtual color Elemental::Series::get_color (  )  const throw () [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.

Implements Elemental::color_value_base.


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

Generated on Sun Oct 4 18:34:15 2009 for libelemental by  doxygen 1.6.1