Repository navigation
Data Manager
Class dataManager
#include "Core/base/data/data_manager.h"-
valueExist(std::filesystem::path filePath, std::string value)- bool variable. Returns true if the specified value exists. -
keyExist(std::filesystem::path filePath, std::string key)- bool variable. Returns true if the specified key exists. -
createData(std::filesystem::path filePath, std::string key, std::string value)- function. Writes the key and its value in json format to the specified file. -
createData(std::filesystem::path filePath, std::vector<std::string> keys, std::vector<std::string> values)- function. Writes keys and their values to the specified file. -
createVectorData(std::filesystem::path filePath, std::vector<std::string> values)- function. Writes values to the specified file. -
deleteData(std::filesystem::path filePath, std::string key)- function. Deletes the key along with its value from the specified file. -
deleteVectorData(std::filesystem::path filePath, std::string value)- function. Deletes a value from a json vector. -
changeData(std::filesystem::path filePath, std::string key, std::string newValue, bool changeKey)- function. Changes the value/key (depends on the changeKey argument) in the specified file. -
changeVectorData(std::filesystem::path filePath, std::string oldValue, std::string newValue)- function. Changes the value in the json vector. -
addData(std::filesystem::path filePath, std::string key, std::string value)- function. Adds a new key and its value to the specified file. -
addData(std::filesystem::path filePath, std::vector<std::string> keys, std::vector<std::string> values)- function. Adds new keys and their values to the specified file. -
addVectorData(std::filesystem::path filePath, std::string value)- function. Adds a new value to a json vector. -
addVectorData(std::filesystem::path filePath, std::vector<std::string> values)- function. Adds new values to the json vector. -
getValue(std::filesystem::path filePath, std::string key)- std::string variable. Returns the value of the specified file key. -
getVectorValue(std::filesystem::path filePath, std::string value)- std::string variable. Returns the value from the json vector of the specified file. -
getKey(std::filesystem::path filePath, std::string value)- std::string variable. Returns the name of the key from the specified file. Not recommended for use. -
readAllData(std::filesystem::path filePath)- std::map<std::string, std::string> variable. Returns all data from the specified json file. -
readAllVectorData(std::filesystem::path filePath)- std::vectorstd::string variable. Returns the entire vector from the specified json file.