Skip to content
Profile.h 1.65 KiB
Newer Older
Daniel Lins de's avatar
Daniel Lins de committed
#include <string>
#include <vector>
#include <Component.h>

using namespace std;

#ifndef _Profile
#define _Profile

enum argvOpt { PROJECTION, TRIANGLE };

class Profile
{
private:
	string fileName_;
	string title_;

	vector <string> argvComps_;	// this are the strings passed by argv to set the components of each projection
	vector <argvOpt> argvType_;	// this are the projections type determined by the option parameters -p ou -m
	vector <Component *> components_;// components read from in file (generated by rcd or other software)
	vector <string> argvColors_;

	int nComps_;		// number of uniq components including x
	int nSteps_;		// number of steps
	int gridSize_;		// grid size
	int legendPos_;
	bool decoration_;
	bool grid_;
	bool verbose_;
	bool debug_;
	int index_;
	float border_;
	float lineWidth_;

	vector <string> frame_;

	int extractComponents(void);
	void extractColors(string);
	int readFile(void);

public:
	Profile(int argc, char **argv);

	// Acessors
	string fileName(void);
	string title(void);

	vector <Component *> components(void);
	Component * component(int i);
	string argvComp(int);
	argvOpt argvType(int);

	int nProjs(void);

	int nComps(void);
	int nSteps(void);
	int gridSize(void);
	int legendPos(void);
	string legend(void);
	bool decoration(void);
	bool grid(void);
	bool verbose(void);
	bool debug(void);
	int index(void);
	float border(void);
	float lineWidth(void);

	// Mutators
	void decoration(bool);
	void grid(bool);
	void index(int);
	void border(float);
	void lineWidth(float);
	void toggleLegend(void);
	void toggleDecoration(void);
	void toggleGrid(void);
	void toggleVerbose(void);
	void printUsage(int);

	string frame(int);

};

#endif