Exemplo n.º 1
0
 explicit compound_command(wml::const_node_ptr node) {
     if(!node) {
         return;
     }
     
     for(wml::node::const_all_child_iterator i = node->begin_children(); i != node->end_children(); ++i) {
         cmd_.push_back(create(*i));
     }
 }
Exemplo n.º 2
0
void parse_postdraw(wml::const_node_ptr postdraw, fb_ptr builder)
{
	for(wml::node::const_all_child_iterator i = postdraw->begin_children();
	    i != postdraw->end_children(); ++i) {
		fdb_ptr fdb = make_fdb(*i);
		if(!fdb.get()) continue;
		builder->add_postdraw(fdb);
	}
}
Exemplo n.º 3
0
event_handler::event_handler(wml::const_node_ptr node)
    : node_(node),
	  first_time_only_(wml::get_bool(node, "first_time_only", false)),
	  already_run_(wml::get_bool(node, "already_run", false))
{
	const std::string& f = wml::get_str(node,"filter");
	if(!f.empty()) {
		filters_.push_back(formula_ptr(new formula(f)));
	}

	for(wml::node::const_all_child_iterator i = node->begin_children();
	    i != node->end_children(); ++i) {
		if((*i)->name() == "filter") {
			filters_.push_back(formula_ptr(new formula((*i)->attr("filter"))));
			continue;
		}

		const_wml_command_ptr cmd(wml_command::create(*i));
		if(cmd) {
			commands_.push_back(cmd);
		}
	}
}