Lines Matching defs:node
97 uint32_t ResConfigParser::GetString(const cJSON *node, int c, HandleBack callback)
99 if (!node || !cJSON_IsString(node)) {
100 cerr << "Error: GetString node not string. Option = " << c << endl;
104 if (callback(c, node->valuestring) != RESTOOL_SUCCESS) {
110 uint32_t ResConfigParser::GetArray(const cJSON *node, int c, HandleBack callback)
112 if (!node || !cJSON_IsArray(node)) {
113 cerr << "Error: GetArray node not array. Option = " << c << endl;
117 for (cJSON *item = node->child; item; item = item->next) {
128 uint32_t ResConfigParser::GetModuleNames(const cJSON *node, int c, HandleBack callback)
130 if (!node) {
131 cerr << "Error: GetModuleNames node is null. Option = " << c << endl;
134 if (cJSON_IsString(node)) {
135 return GetString(node, c, callback);
138 if (GetArray(node, c, [&moduleNames](int c, const string &argValue) {
154 uint32_t ResConfigParser::GetBool(const cJSON *node, int c, HandleBack callback)
156 if (!node || !cJSON_IsBool(node)) {
157 cerr << "Error: GetBool node not bool. Option = " << c << endl;
161 if (cJSON_IsTrue(node) == 1 && callback(c, "") != RESTOOL_SUCCESS) {