#ifndef CPARAMS_H #define CPARAMS_H /** @author Antoine Rozenknop */ #include using std::string ; class CParams{ public: CParams() {} CParams( int nbargs, char * args[] ); ~CParams(); /** * Y a-t-il une instance à traiter ? * @return true/false */ bool hasInstance() const { return m_instance_given; } /** * Doit-on produire un analyse des données à des fins * d'observation ? * @return true/false */ bool analyse() const { return !m_optimize and m_instance_given; } /** * Doit-on résoudre le problème ? * @return true/false */ bool optimize() const { return m_optimize and m_instance_given; } /** * nom de l'instance passée en paramètres */ string getInstanceName() const { return m_instance_name; } /** * temps imparti */ time_t getTimeLimit() const { return m_time_limit; } /** * deadline */ time_t getDeadline() const { return m_time_limit + lancement_programme; } /** * nom du fichier d'output */ string getSolutionName() const { return m_solution_name; } private: bool m_instance_given ; bool m_solution_given ; bool m_optimize ; int m_time_limit ; string m_instance_name ; string m_solution_name ; // int m_team_id ; static time_t lancement_programme ; }; #endif