removed MERGE_INCLUDE_FILES

some static and extern
unused static maps

git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/branches/ErrorHandling@5717 1feff8c3-07ed-0310-ac33-dd36852eb9cd
This commit is contained in:
David L Parkhurst 2011-10-20 23:50:11 +00:00
parent de377b6642
commit be8d41f2a9
18 changed files with 8 additions and 111 deletions

View File

@ -61,9 +61,6 @@ class cxxISolution:public cxxSolution
struct pe_data *pes;
int default_pe;
public:
//static std::map<int, cxxISolution>& map;
};
#endif // !defined(ISOLUTION_H_INCLUDED)

View File

@ -42,35 +42,6 @@ cxxISolutionComp::~cxxISolutionComp(void)
{
}
/*
struct conc *cxxISolutionComp::concarray(std::map <char *, double, CHARSTAR_LESS> &totals)
// for Solutions, not ISolutions
// takes a map of (elt name, moles)
// returns list of conc structures
{
struct conc *c;
c = (struct conc *) P_INSTANCE_POINTER PHRQ_malloc((size_t) ((totals.size() + 1) * sizeof(struct conc)));
if (c == NULL) malloc_error();
int i = 0;
for (std::map <char *, double, CHARSTAR_LESS>::const_iterator it = totals.begin(); it != totals.end(); ++it) {
c[i].description = (char *)it->first;
c[i].moles = it->second;
c[i].input_conc = it->second;
c[i].units = NULL;
c[i].equation_name = NULL;
c[i].phase_si = 0.0;
c[i].n_pe = 0;
c[i].as = NULL;
c[i].gfw = 0.0;
//c[i].skip = 0;
c[i].phase = NULL;
i++;
}
c[i].description = NULL;
return(c);
}
*/
#ifdef SKIP_OR_MOVE_TO_STRUCTURES
struct conc *
cxxISolutionComp::cxxISolutionComp2conc(PHREEQC_PTR_ARG_COMMA const std::map < std::string,

View File

@ -70,14 +70,6 @@ class cxxNameDouble:public
enum ND_TYPE
type;
protected:
//std::map <char *, double, CHARSTAR_LESS> totals;
public:
//static std::map<int, cxxNameDouble>& map;
};
#endif // !defined(NAMEDOUBLE_H_INCLUDED)

View File

@ -7,8 +7,6 @@
#include "PHRQ_base.h"
class CParser;
//extern char *string_duplicate(const char *);
class cxxNumKeyword: public PHRQ_base
{
public:

View File

@ -1,11 +1,9 @@
#include <assert.h>
#include "PHRQ_io.h"
#if defined(MERGE_INCLUDE_FILES)
#include <algorithm>
#include <cctype>
#include <fstream>
#endif /* if defined(MERGE_INCLUDE_FILES) */
PHRQ_io::
PHRQ_io(void)

View File

@ -50,14 +50,10 @@ protected:
void dump_xml(std::ostream & os, unsigned int indent = 0) const;
protected:
//std::list < cxxPPassemblageComp > ppAssemblageComps;
std::map <std::string, cxxPPassemblageComp > ppAssemblageComps;
cxxNameDouble eltList;
cxxNameDouble totals;
public:
//static std::map<int, cxxPPassemblage>& map;
};
#endif // !defined(PPASSEMBLAGE_H_INCLUDED)

View File

@ -280,8 +280,6 @@ class CParser: public PHRQ_base
STATUS_TYPE parse_couple(std::string & token);
//STATUS_TYPE addPair(std::map < char *, double, CHARSTAR_LESS > &totals,
// std::istream::pos_type & pos);
STATUS_TYPE addPair(std::map < std::string, double >&totals,
std::istream::pos_type & pos);

View File

@ -27,10 +27,7 @@
#endif
#include "PHRQ_io.h"
class cxxNameDouble;
#define static static
#define extern
#include "p2c.h"
#undef extern
#include "global_structures.h"
#include "pitzer_structures.h"
class cxxKinetics;
@ -267,10 +264,7 @@ int write_banner(void);
public:
int close_input_files(void);
int close_output_files(void);
//static int getc_callback(void *cookie);
#if defined(MERGE_INCLUDE_FILES)
static int istream_getc(void *cookie);
#endif /* #if defined(MERGE_INCLUDE_FILES) */
int process_file_names(int argc, char *argv[], void **db_cookie,
void **input_cookie, int log);
@ -487,6 +481,8 @@ int rk_kinetics(int i, LDBLE kin_time, int use_mix, int nsaver,
int set_reaction(int i, int use_mix, int use_kinetics);
int set_transport(int i, int use_mix, int use_kinetics, int nsaver);
int store_get_equi_reactants(int k, int kin_end);
int count_pp, count_pg, count_s_s;
LDBLE *x0_moles;
// mainsubs -------------------------------
@ -597,12 +593,7 @@ char *prefix_database_dir(char *s);
void show_progress(const int type, char *s);
#endif
public:
//int fileop_handler(const int type, int (*PFN) (FILE *));
//int open_handler(const int type, const char *file_name);
//int output_handler(const int type, const char *err_str,
// const int stop, void *cookie, const char *format,
// va_list args);
//static int rewind_wrapper(FILE * file_ptr);
void PASCAL_MAIN(int argc, Char **argv);
long my_labs(long x);
Anyptr my_memmove(Anyptr d, Const Anyptr s, size_t n);
@ -1487,10 +1478,8 @@ int isamong(char c, const char *s_l);
Address Hash_multi(HashTable * Table, char *Key);
void ExpandTable_multi(HashTable * Table);
#if defined(MERGE_INCLUDE_FILES)
public:
bool recursive_include(std::ifstream & input_stream, std::iostream & accumulated_stream);
#endif /* #if defined(MERGE_INCLUDE_FILES) */
public: // public methods for PHREEQC_CLASS
int main_method(int argc, char *argv[]);

View File

@ -46,9 +46,6 @@ protected:
bool equalIncrements;
std::string units;
public:
//static std::map<int, cxxReaction>& map;
};
#endif // !defined(REACTION_H_INCLUDED)

View File

@ -56,9 +56,6 @@ protected:
std::map < std::string, cxxSSassemblageSS > ssAssemblageSSs;
cxxNameDouble totals;
public:
//static std::map<int, cxxSSassemblage>& map;
};
#endif // !defined(SSASSEMBLAGE_H_INCLUDED)

View File

@ -191,17 +191,7 @@ cxxSolution::dump_xml(std::ostream & s_oss, unsigned int indent) const
// soln_total conc structures
this->totals.dump_xml(s_oss, indent + 1);
/*
{
for (std::map <char *, double, CHARSTAR_LESS>::const_iterator it = totals.begin(); it != totals.end(); ++it) {
s_oss << indent1;
s_oss << "<soln_total";
s_oss << " conc_desc=\"" << it->first << "\"";
s_oss << " conc_moles=\"" << it->second << "\"" ;
s_oss << "\">" << std::endl;
}
}
*/
// master_activity map
this->master_activity.dump_xml(s_oss, indent + 1);
/*
@ -295,14 +285,6 @@ cxxSolution::dump_raw(std::ostream & s_oss, unsigned int indent, int *n_out) con
it->dump_raw(s_oss, indent + 2);
}
}
/*
for (std::map <char *, double, CHARSTAR_LESS>::const_iterator it = totals.begin(); it != totals.end(); ++it) {
s_oss << indent2;
s_oss << it->first << " " << it->second << std::endl;
}
*/
//s_oss << "# Non-critical values" << std::endl;
s_oss << indent1;
s_oss << "-pH " << this->ph << std::endl;

View File

@ -123,8 +123,6 @@ class cxxStorageBin: public PHRQ_base
std::map < int, cxxReaction > Reactions;
std::map < int, cxxTemperature > Temperatures;
cxxSystem system;
public:
//static std::map<int, cxxStorageBin>& map;
};

View File

@ -71,8 +71,6 @@ protected:
bool transport;
cxxNameDouble totals;
public:
//static std::map<int, cxxSurface>& map;
};
#endif // !defined(SURFACE_H_INCLUDED)

View File

@ -151,7 +151,6 @@ cxxTemperature::dump_raw(std::ostream & s_oss, unsigned int indent, int *n_out)
void
cxxTemperature::read_raw(CParser & parser)
{
double d;
CParser::TOKEN_TYPE k;
static std::vector < std::string > vopts;

View File

@ -32,9 +32,6 @@ protected:
int countTemps;
bool equalIncrements;
public:
//static std::map<int, cxxTemperature>& map;
};
#endif // !defined(TEMPERATURE_H_INCLUDED)

View File

@ -1,6 +1,6 @@
#include "Phreeqc.h"
#include "phrqproto.h"
#include "input.h"
//#include "input.h"
#include "NameDouble.h"
#include "Solution.h"
#include "Reaction.h"
@ -96,13 +96,10 @@ main_method(int argc, char *argv[])
/*
* Load database into memory
*/
#if defined(MERGE_INCLUDE_FILES)
this->set_cookie((std::ifstream *) db_cookie);
errors = read_database(PHRQ_io::istream_getc, db_cookie);
this->clear_cookie();
#else
errors = read_database(getc_callback, db_cookie);
#endif
if (errors != 0)
{
//clean_up();
@ -112,13 +109,11 @@ main_method(int argc, char *argv[])
/*
* Read input data for simulation
*/
#if defined(MERGE_INCLUDE_FILES)
this->set_cookie((std::ifstream *)input_cookie);
errors = run_simulations(PHRQ_io::istream_getc, input_cookie);
this->clear_cookie();
#else
errors = run_simulations(getc_callback, input_cookie);
#endif
if (errors != 0)
{
//clean_up();

View File

@ -61,8 +61,6 @@ class cxxKinetics:public cxxNumKeyword
bool use_cvode;
int cvode_steps;
int cvode_order;
public:
//static std::map<int, cxxKinetics>& map;
};

View File

@ -52,9 +52,6 @@ class cxxMix:public cxxNumKeyword
friend class cxxStorageBin;
std::map < int, double >mixComps;
public:
//static std::map<int, cxxMix>& map;
};
#endif // !defined(CXXMIX_H_INCLUDED)