Написана универсальная библиотека для сохранения и загрузки

pull/3/head
Igor Belitskiy 2 years ago
parent 06b177887e
commit 9227ac6216

@ -16,12 +16,18 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissin
-fstack-clash-protection -fcf-protection -g") -fstack-clash-protection -fcf-protection -g")
set(SOURCE_FILES set(SOURCE_FILES
ubl-settings-quotas.h
ubl-settings-quotas.cc
save.h
save.cc
load.h
load.cc
my_process.h
my_process.cc
util.h util.h
util.cc util.cc
ubl-util-standard.h ubl-util-standard.h
ubl-util-standard.c ubl-util-standard.c
ubl-settings-quotas.h
ubl-settings-quotas.cc
main.cc) main.cc)
set(LIBRARIES set(LIBRARIES

@ -2,7 +2,7 @@
#include "util.h" #include "util.h"
namespace My_Process{ namespace My_Process{
#define debug false
struct Utils::Result<string> My_Process_call::call(string cmd) { struct Utils::Result<string> My_Process_call::call(string cmd) {
this->i_error_old = this->i_error; this->i_error_old = this->i_error;
struct Utils::Result<string> obj_result; struct Utils::Result<string> obj_result;
@ -59,8 +59,7 @@ void My_Process::set_count_error(int count_error) {
this->str_cmd_error = ""; this->str_cmd_error = "";
} }
void My_Process::log_mess_error(string cmd) { void My_Process::log_mess_error(string) {
} }
string My_Process::get_cmd_error() { string My_Process::get_cmd_error() {

@ -11,12 +11,12 @@ class My_Process {
int get_count_error(); int get_count_error();
void set_count_error(int count_error); void set_count_error(int count_error);
void set_back_count_error(); void set_back_count_error();
void log_mess_error(string cmd); void log_mess_error(string);
string get_cmd_error(); string get_cmd_error();
}; };
class My_Process_call: My_Process { class My_Process_call: public My_Process {
public: public:
My_Process_call(); My_Process_call();
struct Utils::Result<string> call(string cmd); struct Utils::Result<string> call(string cmd);
@ -24,7 +24,7 @@ class My_Process_call: My_Process {
}; };
class My_Process_system: My_Process { class My_Process_system: public My_Process {
public: public:
My_Process_system(); My_Process_system();
void call(string cmd, string thread_str); void call(string cmd, string thread_str);

@ -10,7 +10,7 @@ bool Save::get_state_save() {
return this->flag_no_save; return this->flag_no_save;
} }
void Save::set_data_local(std::map <string, string> &map_global) { void Save::set_data_global(std::map <string, string> &map_global) {
this->map_global = &map_global; this->map_global = &map_global;
} }
@ -18,7 +18,7 @@ void Save::set_data_local(std::map <string, string> &map_local) {
this->map_local = &map_local; this->map_local = &map_local;
} }
void Save::set_data_local(std::map <string, string> &map_gui) { void Save::set_data_gui(std::map <string, string> &map_gui) {
this->map_gui = &map_gui; this->map_gui = &map_gui;
} }
@ -52,7 +52,7 @@ bool Save::check_save(string flag_save, string key_name) {
return true; return true;
} }
void Save::save(std::map <string, string> &map_gui, std::map <string, string> &map_temp,string sections, string str_flag_save) { void Save::save(std::map <string, string> &map_gui, string sections, string str_flag_save) {
string key = ""; string key = "";
string value = ""; string value = "";
string cmd = ""; string cmd = "";

@ -15,12 +15,12 @@ private:
public: public:
Save(/* args */); Save(/* args */);
~Save(); ~Save();
void set_data_local(std::map <string, string> &map_global); void set_data_global(std::map <string, string> &map_global);
void set_data_local(std::map <string, string> &map_local); void set_data_local(std::map <string, string> &map_local);
void set_data_local(std::map <string, string> &map_gui); void set_data_gui(std::map <string, string> &map_gui);
bool check_save(string flag_save, string key_name); bool check_save(string flag_save, string key_name);
bool get_state_save(); bool get_state_save();
void save(std::map <string, string> &map_gui, std::map <string, string> &map_temp,string sections, string str_flag_save) ; void save(std::map <string, string> &map_gui, string sections, string str_flag_save) ;
vector<string> get_error(); vector<string> get_error();
}; };
} }

Loading…
Cancel
Save