15 #ifndef TASK_LOADWORDMAP_HPP 16 #define TASK_LOADWORDMAP_HPP 29 template <
class Data >
33 const std::string key_;
36 boost::scoped_ptr< ucam::util::WordMapper > wm_;
42 const std::string& key ,
43 bool reverse =
false ) {
51 const std::string& key ,
52 bool reverse =
false ) :
54 wm_ ( new
ucam::util::WordMapper ( rg.get<std::string> ( key ), reverse ) ) {
55 LINFO (
"LoadWordMapTask key=" << key <<
", Done!" );
59 bool run ( Data& d ) {
61 LINFO (
"wordmap available in data object under key=" << key_ );
62 d.wm[key_] = wm_.get();
64 LINFO (
"Wordmap available");
T get(const std::string &key) const
Returns parsed value associated to key.
Templated (hybrid) Interface for Task classes.
bool exists(const std::string &key) const
Determines whether a program option (key) has been defined by the user.