Example #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';
}
void write_key_val(std::ostream &out, const std::string &key,
	const config::attribute_value &value, unsigned level,
	std::string& textdomain)
{
	if (!boost::get<t_string const>(&value.value)) {
		for (unsigned i = 0; i < level; ++i) out << '\t';
		out << key << '=';
	}
	boost::apply_visitor(write_key_val_visitor(out, level, textdomain, key), value.value);
	out << '\n';
}