| 93 | } |
| 94 | |
| 95 | SimpleJSONWrapper ScriptParams::GetJSONVal(const std::string &val) { |
| 96 | ScriptParamMap::iterator iter = parameter_map_.find(val); |
| 97 | if (iter != parameter_map_.end() && iter->second.IsJSON()) { |
| 98 | return iter->second.GetJSON(); |
| 99 | } else { |
| 100 | DisplayError("Error", ("No parameter \"" + val + "\" of correct type.").c_str()); |
| 101 | SimpleJSONWrapper nullWrapper; |
| 102 | return nullWrapper; |
| 103 | } |
| 104 | } |
| 105 | |
| 106 | bool ScriptParams::HasParam(const std::string &val) const { |
| 107 | return parameter_map_.find(val) != parameter_map_.end(); |