/*
    Copyright (C) 2012 Bartosz Broda, Jacek Bochenek, Łukasz Biłeńkij, 
    Damian Jaworski, Wojciech Mazur, Dominik Piasecki, Maciej Piasecki, 
    Radosław Ramocki
    
    This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by the Free
Software Foundation; either version 3 of the License, or (at your option)
any later version.

    This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. 

    See the LICENSE and COPYING files for more details.
*/

#ifndef CONFIG_H
#define CONFIG_H
#include <boost/program_options.hpp>
#include <string>
#include <iostream>
#include <fstream>
#include <vector>



class Config
{
public:

	/** Initializes config with options specified in input parameters
	  * \param ac Number of input parameters
	  * \param av Input parameters
	  */
	static void init(int ac,char**av);

	/**
	  * \returns instance of current configuration
	  */
	static Config* getInstance();

	//Parameters:
	//MPIRUN
	std::string wbstTesterPath;
	int numOfNodes;
	std::string hostFile;

	std::string workdir;

	//WBST
	std::vector<std::string> matrices;
	std::vector<std::string> wbstTests;
	std::string flex;
	bool loadCCS;
	std::vector<std::string> functions;   //To be parsed


	/**
	  * Deletes current instance of config
	  */
	static void Delete();

private:

	static Config* instance;
	/**
	  * Initializes config based on options specified in input parameters
	  * \param ac Number of input parameters
	  * \param av Input parameters
	  * \param conf Config to be initialized
	  */
	void initOptions(int ac,char**av);

};


#endif // CONFIG_H
