Definition at line 217 of file screenmap.cpp.
219 {
220
222 bool ok =
ParseJson(jsonStrScreenMap, &segmentMaps, err);
223 if (!ok) {
224 return false;
225 }
226 if (segmentMaps.
size() == 0) {
227 return false;
228 }
229 if (segmentMaps.
contains(screenMapName)) {
230 *screenmap = segmentMaps[screenMapName];
231 return true;
232 }
233 string _err = "ScreenMap not found: ";
234 _err.append(screenMapName);
235 if (err) {
236 *err = _err;
237 }
238
239 return false;
240}
bool contains(const Key &key) const
static bool ParseJson(const char *jsonStrScreenMap, fl::fl_map< string, ScreenMap > *segmentMaps, string *err=nullptr)
MapRedBlackTree< Key, T, Compare, fl::allocator_slab< char > > fl_map
References ScreenMap(), fl::string::append(), fl::MapRedBlackTree< Key, Value, Compare, Allocator >::contains(), ParseJson(), and fl::MapRedBlackTree< Key, Value, Compare, Allocator >::size().