#include <utility>
#include <xbt/base.h>
-#include <xbt/config.h>
#include <xbt/sysdep.h>
namespace simgrid {
namespace config {
+class Config;
+
template<class T> inline
std::string to_string(T&& value)
{
extern template XBT_PUBLIC void set_value<std::string>(const char* name, std::string value);
XBT_PUBLIC void set_as_string(const char* name, const std::string& value);
+XBT_PUBLIC void set_parse(std::string options);
// Get config
found = true;
}
if (not found || std::string(val) == "help") {
- std::string mesg;
+ std::string mesg = std::string("\n");
if (std::string(val) == "help")
- mesg = std::string("\nPossible values for option ") + name + ":\n";
+ mesg += std::string("Possible values for option ") + name + ":\n";
else
- mesg = std::string("\nInvalid value '") + val + "' for option " + name + ". Possible values:\n";
+ mesg += std::string("Invalid value '") + val + "' for option " + name + ". Possible values:\n";
for (auto kv : valid_values)
mesg += " - '" + std::string(kv.first) + "': " + kv.second +
(kv.first == value ? " <=== DEFAULT" : "") + "\n";
bool operator>=(U const& that) const { return value_ >= that; }
};
+XBT_PUBLIC void finalize();
+XBT_PUBLIC void show_aliases();
+XBT_PUBLIC void help();
}
}
XBT_ATTRIB_DEPRECATED_v323("Please use simgrid::config::get_value<std::string>") XBT_PUBLIC std::string