本文整理汇总了C++中JSONValue::MemberEnd方法的典型用法代码示例。如果您正苦于以下问题:C++ JSONValue::MemberEnd方法的具体用法?C++ JSONValue::MemberEnd怎么用?C++ JSONValue::MemberEnd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JSONValue
的用法示例。
在下文中一共展示了JSONValue::MemberEnd方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: digestJSON
bool HGEMemoizer::digestJSON(JSONValue& json) {
bool result = 0;
for (JSONMemberIter iter = json.MemberBegin(); iter != json.MemberEnd(); iter++) {
const char * job = iter->first.c_str();
JSONValue const * tools = iter->second;
if (0 == strcmp("clear", job)) {
if (!tools->IsArray()) {
continue;
}
JSONValue const * inputValue = 0;
JSONValue const * streamValue = 0;
VAPIDJSON_GET_ELEMENTS(*tools, &inputValue, &streamValue);
if (!inputValue->IsBool() ||
!streamValue->IsString()) {
continue;
}
bool input = inputValue->GetBool();
const char * stream = streamValue->GetString();
result = this->clear(input, stream) && result;
} else if (0 == strcmp("disable", job)) {
if (!tools->IsArray()) {
continue;
}
JSONValue const * inputValue = 0;
JSONValue const * streamValue = 0;
VAPIDJSON_GET_ELEMENTS(*tools, &inputValue, &streamValue);
if (!inputValue->IsBool() ||
!streamValue->IsString()) {
continue;
}
bool input = inputValue->GetBool();
const char * stream = streamValue->GetString();
result = this->disable(input, stream) && result;
} else if (0 == strcmp("enable", job)) {
if (!tools->IsArray()) {
continue;
}
JSONValue const * inputValue = 0;
JSONValue const * streamValue = 0;
JSONValue const * formatValue = 0;
VAPIDJSON_GET_ELEMENTS(*tools, &inputValue, &streamValue, &formatValue);
if (!inputValue->IsBool() ||
!streamValue->IsString()) {
continue;
}
bool input = inputValue->GetBool();
const char * stream = streamValue->GetString();
const char * format = formatValue->IsString() ? formatValue->GetString() : 0;
result = this->enable(input, stream, format) && result;
} else if (0 == strcmp("rename", job)) {
if (!tools->IsArray()) {
continue;
}
JSONValue const * inputValue = 0;
JSONValue const * streamValue = 0;
JSONValue const * nameValue = 0;
VAPIDJSON_GET_ELEMENTS(*tools, &inputValue, &streamValue, &nameValue);
if (!inputValue->IsBool() ||
!streamValue->IsString() ||
!nameValue->IsString()) {
continue;
}
bool input = inputValue->GetBool();
const char * stream = streamValue->GetString();
const char * name = nameValue->GetString();
result = this->rename(input, stream, name) && result;
}
}
return result;
}