pmt: start working on 1.3.0

- Add log cleaner function.
 - Introduce function flag structure.
 - Some improvements.
This commit is contained in:
2025-09-06 12:10:46 +03:00
parent 063d62fd85
commit 08e51c4a15
12 changed files with 105 additions and 20 deletions

View File

@@ -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;