Skip to content
Profile.h 2.01 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 argument to set the projections components
	vector <argvOpt> argvTypes_;	// this are the projections type determined by the option parameters -p ou -t
	vector <string> argvColors_;	// these are the colors passed by argumente to set the color of each component

	vector <Component *> inputComps_;// components read from input file
	int nComps_;		// number of uniq components including x read from input file
	int nSteps_;		// number of steps read from input file
	int gridSize_;		// grid size read from input file

	int index_;
Daniel Lins de's avatar
Daniel Lins de committed
	int legendPos_;
	bool decoration_;
	bool grid_;
	bool verbose_;
	bool debug_;
	float border_;
	float lineWidth_;
	float printXdim_;
	float printYdim_;
	int fontSize_;
Daniel Lins de's avatar
Daniel Lins de committed

	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);

	string argvComp(int);
	argvOpt argvType(int);
	int nProjs(void);

	vector <Component *> &inputComps(void);
	Component * inputComp(int i);
Daniel Lins de's avatar
Daniel Lins de committed
	int nComps(void);
	int nSteps(void);
	int gridSize(void);

	int index(void);
	int ticMarks(void);
Daniel Lins de's avatar
Daniel Lins de committed
	int legendPos(void);
	string legend(void);
	bool decoration(void);
	bool grid(void);
	bool verbose(void);
	bool debug(void);
	float border(void);
	float lineWidth(void);
	float printXdim(void);
	float printYdim(void);
	int fontSize(void);
Daniel Lins de's avatar
Daniel Lins de committed

	// Mutators
	void index(int);
Daniel Lins de's avatar
Daniel Lins de committed
	void decoration(bool);
	void grid(bool);
	void border(float);
	void lineWidth(float);
	void printXdim(float);
	void printYdim(float);
	void fontSize(int);
	void toggleTicMarks(void);
Daniel Lins de's avatar
Daniel Lins de committed
	void toggleLegend(void);
	void toggleDecoration(void);
	void toggleGrid(void);
	void toggleVerbose(void);
	void printUsage(int);

	string frame(int);

};

#endif