iphreeqc/NameDouble.h
David L Parkhurst 11431ae291 packing and unpacking cxx classes for mpi is running
need to check result.

changed SurfComp.h SurfaceComp.h
changed SurfComp.cxx SurfaceComp.cxx

changed SurfCharge.h SurfaceCharge.h
changed SurfCharge.cxx SurfaceCharge.cxx

Added Dictionary.cxx and Dictionary.h




git-svn-id: svn://136.177.114.72/svn_GW/phreeqcpp/trunk@894 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2006-05-04 00:02:01 +00:00

67 lines
1.7 KiB
C++

#if !defined(NAMEDOUBLE_H_INCLUDED)
#define NAMEDOUBLE_H_INCLUDED
#define EXTERNAL extern
#include <cassert> // assert
#include <map> // std::map
#include <string> // std::string
#include <list> // std::list
#include <vector> // std::vector
#include "global.h"
#include "char_star.h"
#include "Parser.h"
class cxxNameDouble : public std::map <char *, double, CHARSTAR_LESS>
{
public:
enum ND_TYPE {
ND_ELT_MOLES = 1,
ND_SPECIES_LA = 2,
ND_SPECIES_GAMMA = 3,
ND_NAME_COEF = 4
};
cxxNameDouble();
cxxNameDouble(struct elt_list *);
cxxNameDouble(struct conc *);
cxxNameDouble(struct master_activity *ma, int count, ND_TYPE);
cxxNameDouble(struct name_coef *nc, int count);
cxxNameDouble(const cxxNameDouble &old, double factor);
~cxxNameDouble();
struct elt_list *elt_list();
struct master_activity *master_activity()const;
struct conc *conc()const;
struct name_coef *name_coef()const;
void dump_xml(std::ostream& s_oss, unsigned int indent)const;
void dump_raw(std::ostream& s_oss, unsigned int indent)const;
CParser::STATUS_TYPE read_raw(CParser& parser, std::istream::pos_type& pos);
void add(const cxxNameDouble &old, double factor);
void mpi_pack(std::vector<int>& ints, std::vector<double>& doubles);
void mpi_pack(int *ints, int *ii, double *doubles, int *dd);
void mpi_unpack(int *ints, int *ii, double *doubles, int *dd);
enum ND_TYPE type;
protected:
//std::map <char *, double, CHARSTAR_LESS> totals;
public:
//static std::map<int, cxxNameDouble>& map;
};
#endif // !defined(NAMEDOUBLE_H_INCLUDED)