1 #include <msp/core/algorithm.h>
7 Effect::Effect(Renderable &c):
10 enable_for_method(Tag());
13 void Effect::enable_for_method(Tag tag)
15 auto i = lower_bound(enabled_methods, tag);
16 if(i==enabled_methods.end() || *i!=tag)
17 enabled_methods.insert(i, tag);
20 void Effect::disable_for_method(Tag tag)
22 auto i = lower_bound(enabled_methods, tag);
23 if(i!=enabled_methods.end() && *i==tag)
24 enabled_methods.erase(i);
27 bool Effect::is_enabled_for_method(Tag tag) const
29 auto i = lower_bound(enabled_methods, tag);
30 return (i!=enabled_methods.end() && *i==tag);
34 Effect::Template::Loader::Loader(Template &t, Collection &c):
35 CollectionObjectLoader<Template>(t, &c)
38 void Effect::Template::Loader::init_actions()
40 add("content", &Template::content_name);