#include #include #include #include #include using namespace std; #ifndef _Projection #define _Projection class Command; class Projection { private: int ID_; Gnuplot *gplt; string terminal_; string argvComp_; // string sent by the user with -p or -t option vector cmds_; vector inputComps_; vector comps_; vector compToProj_; // individual components separated from argvComp_ (: striped) vector compToLabel_; // individual components separated from argvComp_ (: striped) vector colorToProj_; // individual components separated from argvComp_ (: striped) float xmin_, xmax_, ymin_, ymax_; // min and max values in x and y coords float xSmin_, xSmax_, ySmin_, ySmax_; // custom range selected by the user float border_; bool sRange_; // indicate custom range must be used bool geometry_; void extractArgv(void); void calcRange(string); void replaceCompName(void); void replaceAll(string& str, const string& from, const string& to); public: Projection(int, string, argvOpt, const vector &); int ID(void); Gnuplot * projection(void); string terminal(void); int nCmd(void); Command * cmd(int); void addCmd(Command *); void addComp(Component *); int nComps(void); // number of components string compToProj(int); string compToLabel(int); string colorToProj(int); float xmin(void); float xmax(void); float ymin(void); float ymax(void); bool sRange(void); void setSrange(float, float, float, float); void resetSrange(void); void triangularTransform(void); void findColors(void); void showComps(void); }; #endif