forked from lolo859/vystem
Vystem 0.2
This commit is contained in:
23
vybuild/vybuild-vars.cpp
Normal file
23
vybuild/vybuild-vars.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
#include "vybuild.hpp"
|
||||
#include <map>
|
||||
#include <string>
|
||||
using namespace std;
|
||||
vector<string> global_vars_list={};
|
||||
map<string,string> global_vars;
|
||||
vector<string>& vybuild::vars::get_global_variables_list() {
|
||||
return global_vars_list;
|
||||
}
|
||||
void vybuild::vars::set_global_variable(string key,string value) {
|
||||
global_vars[key]=value;
|
||||
global_vars_list.push_back(key);
|
||||
return;
|
||||
}
|
||||
string vybuild::vars::get_global_variable(string key) {
|
||||
if (key=="DISK_GUID") {
|
||||
for (auto &s:global_vars_list) {
|
||||
cout<<s<<endl;
|
||||
}
|
||||
}
|
||||
return global_vars.at(key);
|
||||
}
|
||||
Reference in New Issue
Block a user