Google

Main Page   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

sc::Units Class Reference

The Units class is used to perform unit converions. More...

#include <units.h>

Inheritance diagram for sc::Units:

Inheritance graph
[legend]
Collaboration diagram for sc::Units:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Storage { Steal, Copy }

Public Methods

 Units (const char *strrep)
 Create using a string representation, like "kcal/mol".

 Units (char *strrep, Units::Storage=Units::Copy)
 Create using a string representation, like "kcal/mol". More...

 Units (StateIn &s)
 Restore the state of a Units object from s.

 ~Units ()
double to (const Ref< Units > &u) const
 The conversion factor from this to u.

double from (const Ref< Units > &u) const
 The conversion factor from u to this.

double to_atomic_units () const
 The conversion factor from this to atomic units.

double from_atomic_units () const
 The conversion factor from atom units to this.

const char * string_rep () const
 The string representation of the units.

void save_data_state (StateOut &s)
 Save the state of the Units object to s.


Protected Methods

void parse_unit ()

Protected Attributes

char * strrep_
double to_atomic_units_

Detailed Description

The Units class is used to perform unit converions.


Constructor & Destructor Documentation

sc::Units::Units char *    strrep,
Units::Storage    = Units::Copy
 

Create using a string representation, like "kcal/mol".

if Units::Steal is given is the second argment, the new Units object will delete the strrep argument when it is destroyed.


The documentation for this class was generated from the following file:
Generated at Fri Jan 10 08:17:20 2003 for MPQC 2.1.3 using the documentation package Doxygen 1.2.14.