iphreeqc/ISolutionComp.h
David L Parkhurst 91f650a5e9 Merged ErrorHandling 6119-6268 changes.
All reactant structs have been removed.
Tony's pressure uses mu in pressure term of log_k.
Test cases run, discriminant check at 1e-8.

Still want to optimize out some k_temp calls and checks for same T, P, mu.

git-svn-id: svn://136.177.114.72/svn_GW/phreeqc3/trunk@6269 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2012-03-06 23:42:49 +00:00

133 lines
2.4 KiB
C++

#if !defined(ISOLUTIONCOMP_H_INCLUDED)
#define ISOLUTIONCOMP_H_INCLUDED
#include <string>
#include <map> // std::map
#include <vector>
#include <set>
#include "PHRQ_base.h"
// forward declarations
class cxxISolution; // reqd for read and dump_xml
class cxxISolutionComp: public PHRQ_base
{
public:
cxxISolutionComp(PHRQ_io *io=NULL);
virtual ~cxxISolutionComp(void);
public:
CParser::STATUS_TYPE read(const char *line, cxxSolution *solution_ptr);
void dump_xml(std::ostream & os, unsigned int indent = 0) const;
const std::string &Get_description() const
{
return this->description;
}
void Set_description(const char *l_description)
{
if (l_description != NULL)
this->description = std::string(l_description);
else
this->description.clear();
}
LDBLE Get_moles() const
{
return this->moles;
}
void Set_moles(LDBLE l_moles)
{
this->moles = l_moles;
}
LDBLE Get_input_conc() const
{
return this->input_conc;
}
void Set_input_conc(LDBLE l_input_conc)
{
this->input_conc = l_input_conc;
}
std::string Get_units()const
{
return this->units;
}
void Set_units(const char *l_units)
{
if (l_units != NULL)
this->units = std::string(l_units);
else
this->units.clear();
}
const std::string &Get_equation_name() const
{
return this->equation_name;
}
void Set_equation_name(const char *l_equation_name)
{
if (l_equation_name != NULL)
this->equation_name = std::string(l_equation_name);
else
this->equation_name.clear();
}
LDBLE Get_phase_si() const
{
return this->phase_si;
}
void Set_phase_si(int l_phase_si)
{
this->phase_si = l_phase_si;
}
std::string Get_pe_reaction() const
{
return this->pe_reaction;
}
void Set_pe_reaction(const std::string & pe_r)
{
this->pe_reaction = pe_r;
}
const std::string &Get_as() const
{
return this->as;
}
void Set_as(const char *l_as)
{
if (l_as != NULL)
this->as = std::string(l_as);
else
this->as.clear();
}
LDBLE Get_gfw() const
{
return this->gfw;
};
void Set_gfw(LDBLE l_gfw)
{
this->gfw = l_gfw;
}
bool operator<(const cxxISolutionComp & conc) const
{
return ::strcmp(this->description.c_str(), conc.description.c_str()) < 0;
}
protected:
std::string description;
LDBLE moles;
LDBLE input_conc;
std::string units;
std::string equation_name;
LDBLE phase_si;
std::string pe_reaction;
std::string as;
LDBLE gfw;
};
#endif // ISOLUTIONCOMP_H_INCLUDED