diff --git a/src/yaml/parsers.hh b/src/yaml/parsers.hh index 428c16e..9a0b5b4 100644 --- a/src/yaml/parsers.hh +++ b/src/yaml/parsers.hh @@ -70,14 +70,14 @@ private: /** - * UtilityParsers handle small reusable bits of YAML and their constructors take - * a C++11 lambda, which will be called back with the result of the parsed data. + * UtilityParsers handle small reusable bits of YAML. Their constructors take a + * C++11 lambda, which will be called back with the result of the parsed data. */ -template +template struct UtilityParser : public Parser { - typedef std::function CallbackFunction; + typedef std::function CallbackFunction; UtilityParser(Scene& scene, ParserStack& parsers, @@ -90,6 +90,12 @@ struct UtilityParser ~UtilityParser() { } + void + Notify(T value) + { + mCallback(value); + } + private: CallbackFunction mCallback; };