iphreeqc/phreeqcpp/ChartHandler.h
Scott Charlton 1d5c59a175 Add 'phreeqcpp/' from commit 'da9d06b423a87ed5eae503c0faf779ac11c96027'
git-subtree-dir: phreeqcpp
git-subtree-mainline: ba5f2ba885b4cc757201e28f9b4dce158f7cc66b
git-subtree-split: da9d06b423a87ed5eae503c0faf779ac11c96027
2018-07-31 16:56:09 -06:00

60 lines
1.2 KiB
C++

#if !defined(CHARTHANDLER_H_INCLUDED)
#define CHARTHANDLER_H_INCLUDED
#if defined MULTICHART
#include <vector>
#include <map>
#include <string>
#include "Parser.h"
#include "ChartObject.h"
#include "PHRQ_base.h"
class ChartHandler: public PHRQ_base
{
public:
ChartHandler(PHRQ_io *io = NULL);
virtual ~ChartHandler();
size_t Get_chart_count()const
{
return this->chart_map.size();
}
ChartObject * Get_current_chart()
{
return this->current_chart;
}
const ChartObject * Get_current_chart()const
{
return this->current_chart;
}
bool Get_timer()
{
return timer;
}
int Get_active_charts() {return this->active_charts;}
void Increment_active_charts()
{
System::Threading::Interlocked::Increment(this->active_charts);
}
void Decrement_active_charts()
{
System::Threading::Interlocked::Decrement(this->active_charts);
}
bool Read(Phreeqc * phreeqc_ptr, CParser &parser);
void Punch_user_graph(Phreeqc * phreeqc_ptr);
bool End_timer();
bool dump(std::ostream & oss, unsigned int indent);
protected:
std::map<int, ChartObject *> chart_map;
int current_chart_n_user;
ChartObject * current_chart;
bool u_g_defined;
bool timer;
int active_charts;
public:
};
#endif // MULTICHART
#endif // !defined(CHARTHANDLER_H_INCLUDED)