Eliminate string_utils include in name_generator.hpp
This commit is contained in:
parent
275adafa86
commit
01e9f11cfb
2 changed files with 8 additions and 4 deletions
|
@ -17,11 +17,9 @@
|
|||
|
||||
#include "global.hpp"
|
||||
#include <string>
|
||||
#include "formula/string_utils.hpp"
|
||||
#include <map>
|
||||
#include <exception>
|
||||
|
||||
typedef std::map< std::string, t_string > string_map;
|
||||
|
||||
class name_generator_invalid_exception : public std::exception {
|
||||
public:
|
||||
name_generator_invalid_exception(const char* errMessage):errMessage_(errMessage) {}
|
||||
|
@ -34,7 +32,8 @@ private:
|
|||
|
||||
class name_generator {
|
||||
public:
|
||||
std::string generate(const std::map<std::string,std::string>& variables) const { return utils::interpolate_variables_into_string(generate(), &variables); };
|
||||
// Defined in name_generator_factory.cpp
|
||||
std::string generate(const std::map<std::string,std::string>& variables) const;
|
||||
virtual std::string generate() const { return ""; }
|
||||
name_generator() {}
|
||||
virtual ~name_generator() {}
|
||||
|
|
|
@ -18,6 +18,11 @@
|
|||
#include "utils/name_generator.hpp"
|
||||
#include "utils/context_free_grammar_generator.hpp"
|
||||
#include "utils/markov_generator.hpp"
|
||||
#include "formula/string_utils.hpp"
|
||||
|
||||
std::string name_generator::generate(const std::map<std::string,std::string>& variables) const {
|
||||
return utils::interpolate_variables_into_string(generate(), &variables);
|
||||
}
|
||||
|
||||
name_generator_factory::name_generator_factory(const config& config, std::vector<std::string> ids) : name_generators_() {
|
||||
add_name_generator_from_config(config, "", "");
|
||||
|
|
Loading…
Add table
Reference in a new issue