add version 0.6 - make external build possible

This commit is contained in:
AndreaRigoni
2025-09-05 18:04:54 +02:00
parent 2e401f6fc5
commit 591cc9d8bc
14 changed files with 179 additions and 91 deletions

View File

@@ -31,6 +31,9 @@
#include <boost/program_options.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/ini_parser.hpp>
//class boost::program_options::error_with_option_name;
//template<> boost::program_options::typed_value<int> boost::program_options::value<int>();
@@ -74,6 +77,23 @@ void Options::parse_config_file(const char *fname)
}
}
void Options::save_config_file(const char *fname) {
std::ofstream os;
os.open(fname);
using boost::property_tree::ptree;
ptree root;
std::cout << m_configuration << "\n";
std::cout << m_global << "\n";
write_ini( std::cout, root );
}
bool Options::count(const char *str) const
{
return (m_vm.count(str));