pmt: start working on 1.3.0
- Add log cleaner function. - Introduce function flag structure. - Some improvements.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <string>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
namespace PartitionManager {
|
||||
std::vector<std::string> splitIfHasDelim(const std::string &s, const char delim,
|
||||
@@ -91,6 +92,18 @@ bool basic_function_manager::isUsed(const std::string &name) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool basic_function_manager::hasFlagOnUsedFunction(const int flag) const {
|
||||
for (const auto &func : _functions) {
|
||||
if (func->isUsed()) {
|
||||
std::for_each(func->flags.begin(), func->flags.end(), [&](const int x) {
|
||||
LOGN(PMTF, INFO) << "Used flag " << x << " on " << func->name() << std::endl;
|
||||
});
|
||||
return std::find(func->flags.begin(), func->flags.end(), flag) != func->flags.end();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool basic_function_manager::handleAll() const {
|
||||
LOGN(PMTF, INFO) << "running caught function commands in command-line."
|
||||
<< std::endl;
|
||||
|
||||
Reference in New Issue
Block a user