antioch-0.4.0
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
Antioch::ParserBase< NumericType > Class Template Referenceabstract

A parser is an instance related to a file. More...

#include <chemical_mixture.h>

Inheritance diagram for Antioch::ParserBase< NumericType >:
Antioch::ASCIIParser< NumericType > Antioch::ChemKinParser< NumericType > Antioch::XMLParser< NumericType >

Public Member Functions

 ParserBase (const std::string &type, const std::string &file, bool verbose=true, const std::string &comments="")
 
virtual ~ParserBase ()
 
virtual bool initialize ()=0
 
virtual void change_file (const std::string &filename)=0
 
virtual const std::vector
< std::string > 
species_list ()
 reads the species set More...
 
virtual void read_chemical_species (ChemicalMixture< NumericType > &)
 reads the mandatory data, not valid in xml && chemkin More...
 
virtual void read_vibrational_data (ChemicalMixture< NumericType > &)
 reads the vibrational data, not valid in xml && chemkin More...
 
virtual void read_electronic_data (ChemicalMixture< NumericType > &)
 reads the electronic data, not valid in xml && chemkin More...
 
virtual void read_transport_data (TransportMixture< NumericType > &)
 reads the transport data, not valid in xml && chemkin More...
 
virtual void read_thermodynamic_data (NASAThermoMixture< NumericType, NASA7CurveFit< NumericType > > &)
 thermo More...
 
virtual void read_thermodynamic_data (NASAThermoMixture< NumericType, NASA9CurveFit< NumericType > > &)
 reads the thermo, NASA generalist, no templates for virtual More...
 
virtual void read_thermodynamic_data (NASAThermoMixture< NumericType, CEACurveFit< NumericType > > &)
 reads the thermo, NASA generalist, no templates for virtual More...
 
virtual void read_thermodynamic_data (CEAThermodynamics< NumericType > &)
 reads the thermo, CEA deprecated More...
 
virtual bool reaction ()
 reaction More...
 
virtual bool rate_constant (const std::string &)
 go to next rate constant More...
 
virtual bool Troe () const
 
virtual const std::string reaction_id () const
 
virtual const std::string reaction_equation () const
 
virtual const std::string reaction_chemical_process () const
 
virtual const std::string reaction_kinetics_model (const std::vector< std::string > &) const
 
virtual bool reaction_reversible () const
 
virtual bool reactants_pairs (std::vector< std::pair< std::string, int > > &) const
 
virtual bool products_pairs (std::vector< std::pair< std::string, int > > &) const
 
virtual const std::map
< std::string, NumericType > 
reactants_orders () const
 return a map between reactants' name and found partial orders More...
 
virtual const std::map
< std::string, NumericType > 
products_orders () const
 return a map between products' name and found partial orders More...
 
virtual bool is_k0 (unsigned int, const std::string &) const
 
virtual unsigned int where_is_k0 (const std::string &) const
 
virtual bool rate_constant_preexponential_parameter (NumericType &, std::string &, std::string &) const
 
virtual bool rate_constant_power_parameter (NumericType &, std::string &, std::string &) const
 
virtual bool rate_constant_activation_energy_parameter (NumericType &, std::string &, std::string &) const
 
virtual bool rate_constant_Berthelot_coefficient_parameter (NumericType &, std::string &, std::string &) const
 
virtual bool rate_constant_Tref_parameter (NumericType &, std::string &, std::string &) const
 
virtual bool rate_constant_lambda_parameter (std::vector< NumericType > &, std::string &, std::string &) const
 
virtual bool rate_constant_cross_section_parameter (std::vector< NumericType > &, std::string &, std::string &) const
 
virtual bool verify_Kooij_in_place_of_Arrhenius () const
 
virtual bool efficiencies (std::vector< std::pair< std::string, NumericType > > &) const
 
virtual bool Troe_alpha_parameter (NumericType &, std::string &, std::string &) const
 
virtual bool Troe_T1_parameter (NumericType &, std::string &, std::string &) const
 
virtual bool Troe_T2_parameter (NumericType &, std::string &, std::string &) const
 
virtual bool Troe_T3_parameter (NumericType &, std::string &, std::string &) const
 
const std::string file () const
 
const std::string type () const
 
bool verbose () const
 
ParsingType enum_type () const
 

Protected Member Functions

void skip_comments (std::istream &doc)
 

Protected Attributes

std::string _type
 
std::string _file
 
bool _verbose
 
std::string _comments
 
std::string _not_implemented
 

Private Member Functions

 ParserBase ()
 

Detailed Description

template<typename NumericType>
class Antioch::ParserBase< NumericType >

A parser is an instance related to a file.

The parser corresponds to a file type (e.g. XML or ChemKin). The file HAS to be given in the constructor as the parser is indissociable from the file. Set to `true' by default, a verbose switch is also available.

We define here the rule of parsing for all parsers. Differences/specificities are described in the corresponding files.

The different things to parse are:

Definition at line 53 of file chemical_mixture.h.

Constructor & Destructor Documentation

template<typename NumericType >
Antioch::ParserBase< NumericType >::ParserBase ( const std::string &  type,
const std::string &  file,
bool  verbose = true,
const std::string &  comments = "" 
)

Definition at line 36 of file parser_base.C.

References Antioch::ParserBase< NumericType >::_file, Antioch::ParserBase< NumericType >::_not_implemented, and Antioch::ParserBase< NumericType >::_type.

37  : _type(type),
38  _file(file),
40  _comments(comments)
41  {
42  std::stringstream os;
43  os << "\n*********************************************************\n"
44  << "This method is not available with a " << _type << " parser.\n"
45  << "Parsing file " << _file << ".\n"
46  << "No format has been defined yet. Maybe contribute?\n"
47  << "https://github.com/libantioch/antioch\n"
48  << "\n\n*********************************************************\n\n";
49 
50  _not_implemented = os.str();
51  }
std::string _comments
Definition: parser_base.h:261
const std::string type() const
Definition: parser_base.h:245
std::string _type
Definition: parser_base.h:258
const std::string file() const
Definition: parser_base.h:242
bool verbose() const
Definition: parser_base.h:248
std::string _file
Definition: parser_base.h:259
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual Antioch::ParserBase< NumericType >::~ParserBase ( )
inlinevirtual

Definition at line 114 of file parser_base.h.

114 {};
template<typename NumericType>
Antioch::ParserBase< NumericType >::ParserBase ( )
private

Member Function Documentation

template<typename NumericType>
virtual void Antioch::ParserBase< NumericType >::change_file ( const std::string &  filename)
pure virtual
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::efficiencies ( std::vector< std::pair< std::string, NumericType > > &  ) const
inlinevirtual
Returns
true if efficiencies are found

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 227 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType >
ParsingType Antioch::ParserBase< NumericType >::enum_type ( ) const
Returns
enum

Definition at line 63 of file parser_base.C.

References antioch_parsing_error, Antioch::ASCII, Antioch::CHEMKIN, and Antioch::XML.

64  {
65  ParsingType PType(ASCII);
66  if(_type == "ascii")
67  {
68  PType = ASCII;
69  }
70  else if(_type == "ChemKin")
71  {
72  PType = CHEMKIN;
73  }
74  else if(_type == "XML")
75  {
76  PType = XML;
77  }
78  else
79  {
80  antioch_parsing_error(std::string("unknown parser type!!! " + _type));
81  }
82 
83  return PType;
84  }
std::string _type
Definition: parser_base.h:258
#define antioch_parsing_error(description)
template<typename NumericType>
const std::string Antioch::ParserBase< NumericType >::file ( ) const
inline
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::initialize ( )
pure virtual
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::is_k0 ( unsigned int  ,
const std::string &   
) const
inlinevirtual
Returns
true if "name" attribute is found with value "k0"

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 197 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual const std::map<std::string,NumericType> Antioch::ParserBase< NumericType >::products_orders ( ) const
inlinevirtual

return a map between products' name and found partial orders

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 194 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

194 {antioch_not_implemented_msg(_not_implemented); return std::map<std::string,NumericType>();}
#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::products_pairs ( std::vector< std::pair< std::string, int > > &  ) const
inlinevirtual
Returns
pairs of products and stoichiometric coefficients

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 188 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::rate_constant ( const std::string &  )
inlinevirtual

go to next rate constant

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 162 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::rate_constant_activation_energy_parameter ( NumericType &  ,
std::string &  ,
std::string &   
) const
inlinevirtual
Returns
true if activation energie

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 209 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::rate_constant_Berthelot_coefficient_parameter ( NumericType &  ,
std::string &  ,
std::string &   
) const
inlinevirtual
Returns
true if D coefficient

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 212 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::rate_constant_cross_section_parameter ( std::vector< NumericType > &  ,
std::string &  ,
std::string &   
) const
inlinevirtual
Returns
true if sigma

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 221 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::rate_constant_lambda_parameter ( std::vector< NumericType > &  ,
std::string &  ,
std::string &   
) const
inlinevirtual
Returns
true if lambda

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 218 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::rate_constant_power_parameter ( NumericType &  ,
std::string &  ,
std::string &   
) const
inlinevirtual
Returns
true if beta coefficient

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 206 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::rate_constant_preexponential_parameter ( NumericType &  ,
std::string &  ,
std::string &   
) const
inlinevirtual
Returns
true if pre exponentiel coefficient

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 203 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::rate_constant_Tref_parameter ( NumericType &  ,
std::string &  ,
std::string &   
) const
inlinevirtual
Returns
true if Tref

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 215 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual const std::map<std::string,NumericType> Antioch::ParserBase< NumericType >::reactants_orders ( ) const
inlinevirtual

return a map between reactants' name and found partial orders

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 191 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

191 {antioch_not_implemented_msg(_not_implemented); return std::map<std::string,NumericType>();}
#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::reactants_pairs ( std::vector< std::pair< std::string, int > > &  ) const
inlinevirtual
Returns
pairs of reactants and stoichiometric coefficients

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 185 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::reaction ( )
inlinevirtual

reaction

read & store current reaction and go to next reaction

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 159 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual const std::string Antioch::ParserBase< NumericType >::reaction_chemical_process ( ) const
inlinevirtual
Returns
reaction chemical process

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 176 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

176 {antioch_not_implemented_msg(_not_implemented); return std::string();}
#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual const std::string Antioch::ParserBase< NumericType >::reaction_equation ( ) const
inlinevirtual
Returns
reaction equation

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 173 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

173 {antioch_not_implemented_msg(_not_implemented); return std::string();}
#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual const std::string Antioch::ParserBase< NumericType >::reaction_id ( ) const
inlinevirtual
Returns
reaction id, 0 if not provided

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 170 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

170 {antioch_not_implemented_msg(_not_implemented); return std::string();}
#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual const std::string Antioch::ParserBase< NumericType >::reaction_kinetics_model ( const std::vector< std::string > &  ) const
inlinevirtual
Returns
reaction kinetics model

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 179 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

179 {antioch_not_implemented_msg(_not_implemented); return std::string();}
#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::reaction_reversible ( ) const
inlinevirtual
Returns
reversible state

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 182 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual void Antioch::ParserBase< NumericType >::read_chemical_species ( ChemicalMixture< NumericType > &  )
inlinevirtual

reads the mandatory data, not valid in xml && chemkin

Reimplemented in Antioch::ASCIIParser< NumericType >.

Definition at line 127 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_species_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual void Antioch::ParserBase< NumericType >::read_electronic_data ( ChemicalMixture< NumericType > &  )
inlinevirtual

reads the electronic data, not valid in xml && chemkin

Reimplemented in Antioch::ASCIIParser< NumericType >.

Definition at line 133 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_species_electronic_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual void Antioch::ParserBase< NumericType >::read_thermodynamic_data ( NASAThermoMixture< NumericType, NASA7CurveFit< NumericType > > &  )
inlinevirtual

thermo

reads the thermo, NASA generalist, no templates for virtual

Reimplemented in Antioch::ASCIIParser< NumericType >, Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 143 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_cea_mixture_data(), and Antioch::read_nasa_mixture_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual void Antioch::ParserBase< NumericType >::read_thermodynamic_data ( NASAThermoMixture< NumericType, NASA9CurveFit< NumericType > > &  )
inlinevirtual

reads the thermo, NASA generalist, no templates for virtual

Reimplemented in Antioch::ASCIIParser< NumericType >, Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 146 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual void Antioch::ParserBase< NumericType >::read_thermodynamic_data ( NASAThermoMixture< NumericType, CEACurveFit< NumericType > > &  )
inlinevirtual

reads the thermo, NASA generalist, no templates for virtual

Reimplemented in Antioch::ASCIIParser< NumericType >, Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 149 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual void Antioch::ParserBase< NumericType >::read_thermodynamic_data ( CEAThermodynamics< NumericType > &  )
inlinevirtual
template<typename NumericType>
virtual void Antioch::ParserBase< NumericType >::read_transport_data ( TransportMixture< NumericType > &  )
inlinevirtual

reads the transport data, not valid in xml && chemkin

Reimplemented in Antioch::ASCIIParser< NumericType >.

Definition at line 138 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_transport_species_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual void Antioch::ParserBase< NumericType >::read_vibrational_data ( ChemicalMixture< NumericType > &  )
inlinevirtual

reads the vibrational data, not valid in xml && chemkin

Reimplemented in Antioch::ASCIIParser< NumericType >.

Definition at line 130 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_species_vibrational_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType >
void Antioch::ParserBase< NumericType >::skip_comments ( std::istream &  doc)
protected

Definition at line 54 of file parser_base.C.

References Antioch::skip_comment_lines().

Referenced by Antioch::ASCIIParser< NumericType >::ASCIIParser().

55  {
56  for(unsigned int c = 0; c < _comments.size(); c++)
57  {
59  }
60  }
std::string _comments
Definition: parser_base.h:261
void skip_comment_lines(std::istream &in, const char comment_start)
Skip comment lines in the header of an ASCII text file prefixed with the comment character 'comment_s...
Definition: input_utils.h:46
template<typename NumericType>
virtual const std::vector<std::string> Antioch::ParserBase< NumericType >::species_list ( )
inlinevirtual

reads the species set

species

Reimplemented in Antioch::ASCIIParser< NumericType >, Antioch::XMLParser< NumericType >, and Antioch::ChemKinParser< NumericType >.

Definition at line 124 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_chemical_species_composition().

124 {antioch_not_implemented_msg(_not_implemented); return std::vector<std::string>();}
#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::Troe ( ) const
inlinevirtual
Returns
true if there's a Troe block

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 167 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::Troe_alpha_parameter ( NumericType &  ,
std::string &  ,
std::string &   
) const
inlinevirtual
Returns
true is alpha

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 230 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::Troe_T1_parameter ( NumericType &  ,
std::string &  ,
std::string &   
) const
inlinevirtual
Returns
true is alpha

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 233 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::Troe_T2_parameter ( NumericType &  ,
std::string &  ,
std::string &   
) const
inlinevirtual
Returns
true is alpha

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 236 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::Troe_T3_parameter ( NumericType &  ,
std::string &  ,
std::string &   
) const
inlinevirtual
Returns
true is alpha

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 239 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
const std::string Antioch::ParserBase< NumericType >::type ( ) const
inline
Returns
type of parser

Definition at line 245 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_type.

245 {return _type;}
std::string _type
Definition: parser_base.h:258
template<typename NumericType>
bool Antioch::ParserBase< NumericType >::verbose ( ) const
inline
template<typename NumericType>
virtual bool Antioch::ParserBase< NumericType >::verify_Kooij_in_place_of_Arrhenius ( ) const
inlinevirtual
Returns
true if a Kooij is called Arrhenuis

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 224 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263
template<typename NumericType>
virtual unsigned int Antioch::ParserBase< NumericType >::where_is_k0 ( const std::string &  ) const
inlinevirtual
Returns
index of k0 (0 or 1)

Reimplemented in Antioch::ChemKinParser< NumericType >, and Antioch::XMLParser< NumericType >.

Definition at line 200 of file parser_base.h.

References Antioch::ParserBase< NumericType >::_not_implemented, and antioch_not_implemented_msg.

Referenced by Antioch::read_reaction_set_data().

#define antioch_not_implemented_msg(errmsg)
std::string _not_implemented
Definition: parser_base.h:263

Member Data Documentation

template<typename NumericType>
std::string Antioch::ParserBase< NumericType >::_comments
protected

Definition at line 261 of file parser_base.h.

template<typename NumericType>
std::string Antioch::ParserBase< NumericType >::_file
protected
template<typename NumericType>
std::string Antioch::ParserBase< NumericType >::_not_implemented
protected

Definition at line 263 of file parser_base.h.

Referenced by Antioch::ParserBase< NumericType >::efficiencies(), Antioch::ParserBase< NumericType >::is_k0(), Antioch::ParserBase< NumericType >::ParserBase(), Antioch::ParserBase< NumericType >::products_orders(), Antioch::ParserBase< NumericType >::products_pairs(), Antioch::ParserBase< NumericType >::rate_constant(), Antioch::ParserBase< NumericType >::rate_constant_activation_energy_parameter(), Antioch::ParserBase< NumericType >::rate_constant_Berthelot_coefficient_parameter(), Antioch::ParserBase< NumericType >::rate_constant_cross_section_parameter(), Antioch::ParserBase< NumericType >::rate_constant_lambda_parameter(), Antioch::ParserBase< NumericType >::rate_constant_power_parameter(), Antioch::ParserBase< NumericType >::rate_constant_preexponential_parameter(), Antioch::ParserBase< NumericType >::rate_constant_Tref_parameter(), Antioch::ParserBase< NumericType >::reactants_orders(), Antioch::ParserBase< NumericType >::reactants_pairs(), Antioch::ParserBase< NumericType >::reaction(), Antioch::ParserBase< NumericType >::reaction_chemical_process(), Antioch::ParserBase< NumericType >::reaction_equation(), Antioch::ParserBase< NumericType >::reaction_id(), Antioch::ParserBase< NumericType >::reaction_kinetics_model(), Antioch::ParserBase< NumericType >::reaction_reversible(), Antioch::ParserBase< NumericType >::read_chemical_species(), Antioch::ParserBase< NumericType >::read_electronic_data(), Antioch::ParserBase< NumericType >::read_thermodynamic_data(), Antioch::ParserBase< NumericType >::read_transport_data(), Antioch::ParserBase< NumericType >::read_vibrational_data(), Antioch::ParserBase< NumericType >::species_list(), Antioch::ParserBase< NumericType >::Troe(), Antioch::ParserBase< NumericType >::Troe_alpha_parameter(), Antioch::ParserBase< NumericType >::Troe_T1_parameter(), Antioch::ParserBase< NumericType >::Troe_T2_parameter(), Antioch::ParserBase< NumericType >::Troe_T3_parameter(), Antioch::ParserBase< NumericType >::verify_Kooij_in_place_of_Arrhenius(), and Antioch::ParserBase< NumericType >::where_is_k0().

template<typename NumericType>
std::string Antioch::ParserBase< NumericType >::_type
protected
template<typename NumericType>
bool Antioch::ParserBase< NumericType >::_verbose
protected

Definition at line 260 of file parser_base.h.

Referenced by Antioch::ParserBase< NumericType >::verbose().


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

Generated on Thu Jul 7 2016 11:09:49 for antioch-0.4.0 by  doxygen 1.8.8