38 using namespace Input::Type;
42 =
Record(
"Substance",
"Chemical substance.")
58 name_ = in_rec.
val<std::string>(
"name");
70 substances_ = boost::make_shared<std::vector<Substance> >();
71 names_ = boost::make_shared<std::vector<std::string> >();
76 (*substances_).push_back(s);
77 (*names_).push_back(s.
name());
90 substances_ = boost::make_shared<std::vector<Substance> >();
91 names_ = boost::make_shared<std::vector<std::string> >(
names);
94 (*substances_).resize(names.size());
95 for (
unsigned int i=0; i<names.size(); ++i) (*
substances_)[i].name_ = names[i];
Substance()
Default constructor.
const std::vector< std::string > & names()
boost::shared_ptr< std::vector< Substance > > substances_
The actual list of substances.
void initialize(const Input::Array &in_array)
Read from input array.
boost::shared_ptr< std::vector< std::string > > names_
Auxiliary list of substance names used in some classes.
std::string name_
Name of a chemical substance.
double molar_mass_
Molar mass [kg/mol] of the substance.
Classes for storing substance data.
static Input::Type::Record input_type
Input type for a substance.
std::string name() const
Getter for substance name.