29 #define ERR_CF LOG_STREAM(err, log_config)
33 if(name ==
"default" || name ==
"") {
35 }
else if(name ==
"cave") {
37 }
else if(name ==
"lua") {
51 assert(!parameters.empty());
53 if(generator ==
nullptr) {
55 ss <<
"could not find map generator '" << parameters.front() <<
"'";
59 parameters.erase(parameters.begin());
60 return generator.get()->create_map();
68 assert(!parameters.empty());
70 if(generator ==
nullptr) {
72 ss <<
"could not find map generator '" << parameters.front() <<
"'";
76 parameters.erase(parameters.begin());
77 return generator->create_scenario();
std::string random_generate_map(const std::string &parms, const config &cfg)
static lg::log_domain log_config("config")
rng * generator
This generator is automatically synced during synced context.
scoped_resource: class template, functions, helper policies etc. for resource management.
config random_generate_scenario(const std::string &parms, const config &cfg)
map_generator * create_map_generator(const std::string &name, const config &cfg)
A class which implements an approximation of template typedef scoped_resource scoped_ptr;.
const std::string & parameters
GLuint const GLchar * name
Standard logging facilities (interface).
std::vector< std::string > split(std::string const &val, const char c, const int flags)
Splits a (comma-)separated string into a vector of pieces.
A config object defines a single node in a WML file, with access to child nodes.
GLsizei const GLcharARB ** string