Exemple #1
0
void write_key_val(std::ostream &out, const std::string &key,
                   const config::attribute_value &value, unsigned level,
                   std::string& textdomain)
{
	value.apply_visitor(write_key_val_visitor(out, level, textdomain, key));
	out << '\n';
}
Exemple #2
0
void unit_filter_compound::create_attribute(const config::attribute_value v, C conv, F func)
{
	if(v.empty()) {
	}
	else if(v.apply_visitor(contains_dollar_visitor())) {
		children_.emplace_back(new unit_filter_attribute_literal<C, F>(std::move(v.str()), std::move(conv), std::move(func)));
	}
	else {
		children_.emplace_back(new unit_filter_attribute_parsed<decltype(conv(v)), F>(std::move(conv(v)), std::move(func)));
	}
}
Exemple #3
0
void luaW_pushscalar(lua_State *L, config::attribute_value const &v)
{
	v.apply_visitor(luaW_pushscalar_visitor(L));
}