| 6085 | } |
| 6086 | |
| 6087 | static CScriptArray* JSONValueGetMembers(Json::Value* self) { |
| 6088 | asIScriptContext* ctx = asGetActiveContext(); |
| 6089 | asIScriptEngine* engine = ctx->GetEngine(); |
| 6090 | asITypeInfo* arrayType = engine->GetTypeInfoById(engine->GetTypeIdByDecl("array<string>")); |
| 6091 | CScriptArray* array = CScriptArray::Create(arrayType, (asUINT)0); |
| 6092 | |
| 6093 | std::vector<std::string> members = self->getMemberNames(); |
| 6094 | |
| 6095 | array->Reserve(members.size()); |
| 6096 | |
| 6097 | for (const auto& member : members) { |
| 6098 | array->InsertLast((void*)(&member)); |
| 6099 | } |
| 6100 | return array; |
| 6101 | } |
| 6102 | |
| 6103 | static std::string JSONValueTypeName(Json::Value* self) { |
| 6104 | switch (self->type()) { |
nothing calls this directly
no test coverage detected