Added use_postgres arg
This commit is contained in:
parent
cf90d2ab2b
commit
76154631ee
@ -554,6 +554,8 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
AGGenInstance _instance;
|
AGGenInstance _instance;
|
||||||
//the following five assignments to _instance's members are all from db_function.cpp
|
//the following five assignments to _instance's members are all from db_function.cpp
|
||||||
|
//the following five assignments are only applicable when use_postgres is set to true
|
||||||
|
if (use_postgres) {
|
||||||
_instance.facts = fetch_facts();
|
_instance.facts = fetch_facts();
|
||||||
//The above function call returned an Keyvalue object and assigned the object to facts. The object mainly contains hash table and string vector based on all initial property and value.
|
//The above function call returned an Keyvalue object and assigned the object to facts. The object mainly contains hash table and string vector based on all initial property and value.
|
||||||
//the following 4 lines can be used to check the content of the facts. It is based on the initial property and value from table quality, postcondition and topology.
|
//the following 4 lines can be used to check the content of the facts. It is based on the initial property and value from table quality, postcondition and topology.
|
||||||
@ -568,7 +570,12 @@ int main(int argc, char *argv[]) {
|
|||||||
_instance.assets = fetch_all_assets(_instance.facts); //fetch each asset name and its related qualities.
|
_instance.assets = fetch_all_assets(_instance.facts); //fetch each asset name and its related qualities.
|
||||||
_instance.exploits = fetch_all_exploits(); //fetch each exploit and its precondition and post conditions from initial exploits
|
_instance.exploits = fetch_all_exploits(); //fetch each exploit and its precondition and post conditions from initial exploits
|
||||||
auto ex = fetch_all_exploits(); //make a copy of initial exploits
|
auto ex = fetch_all_exploits(); //make a copy of initial exploits
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
std::cout << parsednm << std::endl;
|
||||||
|
std::cout << "Not yet implemented." << std::endl;
|
||||||
|
return(1);
|
||||||
|
}
|
||||||
std::cout << "Assets: " << _instance.assets.size() << "\n"; //# of assets, vector size
|
std::cout << "Assets: " << _instance.assets.size() << "\n"; //# of assets, vector size
|
||||||
std::cout << "Exploits: " << _instance.exploits.size() << "\n"; //# of exploits, vector size
|
std::cout << "Exploits: " << _instance.exploits.size() << "\n"; //# of exploits, vector size
|
||||||
std::cout << "Facts: " << _instance.facts.size() << "\n"; //how many different parameters and values are there? class size() method
|
std::cout << "Facts: " << _instance.facts.size() << "\n"; //how many different parameters and values are there? class size() method
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user