MCPcopy Create free account
hub / github.com/OpenDriveLab/OpenLane / KeyExist

Method KeyExist

eval/LANE_evaluation/lane2d/src/CJsonObject.cpp:651–673  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

649}
650
651bool CJsonObject::KeyExist(const std::string& strKey) const
652{
653 cJSON* pJsonStruct = NULL;
654 if (m_pJsonData != NULL)
655 {
656 if (m_pJsonData->type == cJSON_Object)
657 {
658 pJsonStruct = cJSON_GetObjectItem(m_pJsonData, strKey.c_str());
659 }
660 }
661 else if (m_pExternJsonDataRef != NULL)
662 {
663 if(m_pExternJsonDataRef->type == cJSON_Object)
664 {
665 pJsonStruct = cJSON_GetObjectItem(m_pExternJsonDataRef, strKey.c_str());
666 }
667 }
668 if (pJsonStruct == NULL)
669 {
670 return(false);
671 }
672 return(true);
673}
674
675bool CJsonObject::Get(const std::string& strKey, CJsonObject& oJsonObject) const
676{

Callers

nothing calls this directly

Calls 1

cJSON_GetObjectItemFunction · 0.85

Tested by

no test coverage detected