iphreeqc/CSelectedOutput.hxx
David L Parkhurst c3dbe39d24 Working on sending select_output data to root process.
Have serializerr and deserializer.
Have mpi and thread processing.
Need to write the part that writes the xyz and hdf files.

git-svn-id: svn://136.177.114.72/svn_GW/IPhreeqc/trunk@8179 1feff8c3-07ed-0310-ac33-dd36852eb9cd
2013-11-06 23:36:15 +00:00

71 lines
1.6 KiB
C++

// SelectedOutput.h: interface for the CSelectedOutput class.
//
//////////////////////////////////////////////////////////////////////
#if !defined _INC_SELECTEDOUTPUT_H
#define _INC_SELECTEDOUTPUT_H
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <string>
#include <map>
#include <list>
#include <vector>
#include "CVar.hxx"
class CSelectedOutput
{
public:
CSelectedOutput(void);
virtual ~CSelectedOutput(void);
int EndRow(void);
void Clear(void);
size_t GetRowCount(void)const;
size_t GetColCount(void)const;
CVar Get(int nRow, int nCol)const;
VRESULT Get(int nRow, int nCol, VAR* pVAR)const;
int PushBack(const char* key, const CVar& var);
int PushBackDouble(const char* key, double dVal);
int PushBackLong(const char* key, long lVal);
int PushBackString(const char* key, const char* sVal);
int PushBackEmpty(const char* key);
// Serialize
void CSelectedOutput::Serialize(
std::vector<int> &types,
std::vector<long> &longs,
std::vector<double> &doubles,
std::string &strings);
void CSelectedOutput::DeSerialize(
std::vector<int> &types,
std::vector<long> &longs,
std::vector<double> &doubles,
std::string &strings);
#if defined(_DEBUG)
void Dump(const char* heading);
void AssertValid(void)const;
#endif
protected:
friend std::ostream& operator<< (std::ostream &os, const CSelectedOutput &a);
size_t m_nRowCount;
std::vector< std::vector<CVar> > m_arrayVar;
std::vector<CVar> m_vecVarHeadings;
std::map< std::string, size_t > m_mapHeadingToCol;
private:
static CSelectedOutput* s_instance;
};
#endif // !defined(_INC_SELECTEDOUTPUT_H)