19 #ifndef NAF_TOOLS_SETTINGSMANAGER
20 #define NAF_TOOLS_SETTINGSMANAGER
28 #include "yaml-cpp/node/detail/iterator_fwd.h"
29 #include "yaml-cpp/node/node.h"
30 #include "yaml-cpp/yaml.h"
31 #include "Poco/Exception.h"
33 #include "tools/output_logger.h"
39 class SettingsManager;
51 int port, max_queued, max_threads, session_max_age;
53 std::string db_host, db_port, db_name, db_user, db_password;
54 std::string directory_base, directory_for_uploaded_files, directory_for_temp_files;
55 std::string certificate, key, rootcert;
56 std::string logger_output_file;
64 auto& var = basic_properties_;
67 static std::string get_properties_file_address() {
return properties_file_address_; }
69 static void set_properties_file_address(std::string properties_file_address) { properties_file_address_ = properties_file_address; }
71 static void SetUpProperties_();
72 static void ReadBasicProperties_();
75 static bool VerifyYAMLScalarNode_(YAML::Node& node);
76 static bool VerifyYAMLMapNode_(YAML::Node& node);
77 static void PrintError_(std::string
function, std::string variable);
80 static std::mutex mutex_;
81 static BasicProperties basic_properties_;
82 static std::string properties_file_address_;