Cantera  2.0
Public Member Functions | Public Attributes | Friends | List of all members
Element Class Reference

A class for elements. More...

#include <Element.h>

Public Member Functions

 Element ()
 Construct a new empty Element object.
 
 Element (const std::string &nm, double wt)
 Construct a new empty Element object.
 
 ~Element ()
 Destructor.
 
bool operator== (const Element &e) const
 Compare two Element instances for equality based on name.
 
bool operator!= (const Element &e) const
 

Public Attributes

std::string name
 Element name.
 
double atomicWeight
 Atomic weight in amu.
 
int valid
 flag returned by validation routines
 
int index
 index number
 
bool weightFromDB
 true if atomic weight is not specified
 
std::string comment
 comment in input file
 

Friends

std::ostream & operator<< (std::ostream &s, const Element &e)
 

Detailed Description

A class for elements.

Example usage:

e.name = "He";
e.atomicWeight = 4.0026;
e.comment = "helium";

Definition at line 30 of file Element.h.

Constructor & Destructor Documentation

Element ( )
inline

Construct a new empty Element object.

Definition at line 35 of file Element.h.

Element ( const std::string &  nm,
double  wt 
)
inline

Construct a new empty Element object.

Definition at line 46 of file Element.h.

~Element ( )
inline

Destructor.

Definition at line 57 of file Element.h.

Member Function Documentation

bool operator== ( const Element e) const
inline

Compare two Element instances for equality based on name.

Primarily for internal use.

Definition at line 71 of file Element.h.

References Element::name.

Member Data Documentation

std::string name

Element name.

Definition at line 59 of file Element.h.

Referenced by Element::operator==(), and CKParser::readElementSection().

double atomicWeight

Atomic weight in amu.

Definition at line 60 of file Element.h.

Referenced by CKParser::readElementSection().

int valid

flag returned by validation routines

Definition at line 61 of file Element.h.

Referenced by CKParser::readElementSection().

int index

index number

Definition at line 62 of file Element.h.

Referenced by CKParser::readElementSection().

bool weightFromDB

true if atomic weight is not specified

Definition at line 63 of file Element.h.

Referenced by CKParser::readElementSection().

std::string comment

comment in input file

Definition at line 64 of file Element.h.

Referenced by CKParser::readElementSection().


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