コード例 #1
0
Stencil& Stencil::html(const std::string& html){
	// Clear content before appending new content from Html::Document
	clear();
	Html::Document doc(html);
	auto body = doc.find("body");
	if(auto elem = body.find("main","id","content")){
		append_children(elem);
	}
	else append_children(doc.find("body"));
	return *this;
}
コード例 #2
0
ファイル: config.cpp プロジェクト: Coffee--/wesnoth-old
void config::append(const config &cfg)
{
	append_children(cfg);
	BOOST_FOREACH(const attribute &v, cfg.values) {
		values[v.first] = v.second;
	}
}
コード例 #3
0
ファイル: config.cpp プロジェクト: blackberry/Wesnoth
void config::append(const config &cfg)
{
	append_children(cfg);
	foreach (const attribute &v, cfg.values) {
		values[v.first] = v.second;
	}
}
コード例 #4
0
ファイル: xml.cpp プロジェクト: codeaudit/stencila
Node Node::append_xml(const std::string& xml){
	Document doc(xml);
	// To append a pugi::xml_document it is necessary to append each of
	// it children (instead of just the document root)
	append_children(doc);
	return doc;
}   
コード例 #5
0
ファイル: config.cpp プロジェクト: Coffee--/wesnoth-old
config& config::operator=(const config& cfg)
{
	if(this == &cfg) {
		return *this;
	}

	clear();
	append_children(cfg);
	values.insert(cfg.values.begin(), cfg.values.end());
	return *this;
}
コード例 #6
0
ファイル: config.cpp プロジェクト: Coffee--/wesnoth-old
config::config(const config& cfg) : values(cfg.values), children(), ordered_children()
{
	append_children(cfg);
}