2020-05-08 12:42:02 +02:00
|
|
|
#ifndef READ_USES_H
|
|
|
|
#define READ_USES_H
|
|
|
|
#include <string>
|
|
|
|
#include <fstream>
|
|
|
|
#include <list>
|
|
|
|
|
|
|
|
class read_uses
|
|
|
|
{
|
|
|
|
public:
|
2020-06-01 23:24:24 +02:00
|
|
|
/**
|
|
|
|
* @brief read_uses
|
|
|
|
* Object that read configuration for a package
|
|
|
|
* @param name Name from a package
|
|
|
|
*/
|
2020-05-08 12:42:02 +02:00
|
|
|
read_uses(std::string name);
|
2020-06-01 23:24:24 +02:00
|
|
|
/**
|
|
|
|
* @brief get_uses
|
|
|
|
* Get the content of a config file
|
|
|
|
* @return Content of a config file
|
|
|
|
*/
|
2020-05-08 12:42:02 +02:00
|
|
|
std::string* get_uses();
|
2020-06-01 23:24:24 +02:00
|
|
|
/**
|
|
|
|
* @brief exist_file
|
|
|
|
* Say if a package have config file
|
|
|
|
* @return True if package exists, false if not
|
|
|
|
*/
|
2020-05-13 00:56:26 +02:00
|
|
|
bool exist_file();
|
2020-05-08 12:42:02 +02:00
|
|
|
private:
|
|
|
|
std::ifstream file;
|
|
|
|
std::string short_name;
|
|
|
|
bool exist;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // READ_USES_H
|