Code Review
/
apps
/
agl-service-can-low-level.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Static code review fixes.
[apps/agl-service-can-low-level.git]
/
CAN-binder
/
low-can-binding
/
utils
/
config-parser.hpp
diff --git
a/CAN-binder/low-can-binding/utils/config-parser.hpp
b/CAN-binder/low-can-binding/utils/config-parser.hpp
index
2d50485
..
3115e9b
100644
(file)
--- a/
CAN-binder/low-can-binding/utils/config-parser.hpp
+++ b/
CAN-binder/low-can-binding/utils/config-parser.hpp
@@
-17,14
+17,10
@@
#pragma once
#pragma once
-#include <fcntl.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
-#include <json-c/json.h>
-
#include <string>
#include <vector>
#include <string>
#include <vector>
-#include "INIReader.h"
+#include <utility>
+#include "ini-config.hpp"
namespace utils
{
namespace utils
{
@@
-33,13
+29,16
@@
namespace utils
class config_parser_t
{
private:
class config_parser_t
{
private:
- INIReader config_content_; /*!< config_content_ - Parsed content of INI file.*/
+ const std::string filepath_; /*!< filepath_ - Path to the config file*/
+ ini_config config_content_; /*!< config_content_ - Parsed content of INI file.*/
public:
public:
- config_parser_t(int conf_file);
- config_parser_t(std::string conf_file);
+ config_parser_t(config_parser_t&&) = default;
+ config_parser_t(const config_parser_t&) = default;
+ explicit config_parser_t(std::string conf_file);
+ const std::string& filepath() const;
bool check_conf();
bool check_conf();
- const std::vector<std::
string
> get_devices_name();
+ const std::vector<std::
pair<std::string, std::string>
> get_devices_name();
};
}
};
}