📄 map_prof.cpp
字号:
else ret = PropagateCall(m_array, &GenMapProfBase::CreateElements, index, num); return ret;}bool HLXMapProf::HandleClearElCmd(const UTVector<UTString>& /*info*/){ return PropagateCall(m_array, &GenMapProfBase::ClearElements); // return ClearElements();}#ifdef XXXSABbool HLXMapProf::ClearElements(){ bool ret = true; for (int i = 0; ret && (i < m_array.GetSize()); i++) { GenMapProfBase* pObj = (GenMapProfBase*)m_array[i]; if (pObj) ret = pObj->ClearElements(); } return ret;}#endif /* XXXSAB */bool HLXMapProf::HandleGetCountCmd(const UTVector<UTString>& info){ bool ret = false; int expected = 0; if (!UTParamUtil::GetInt(info[1], expected)) { DPRINTF(D_ERROR, ("HLXMapProf::HandleGetCountCmd : failed to convert parameter\n")); } else ret = GetCount(expected); return ret;}bool HLXMapProf::GetCount(int expected){ bool ret = true; for (int i = 0; ret && (i < m_array.GetSize()); i++) { GenMapProfBase* pObj = (GenMapProfBase*)m_array[i]; if (pObj) ret = pObj->GetCount(expected); } return ret;}bool HLXMapProf::HandleIsEmptyCmd(const UTVector<UTString>& info){ bool ret = false; bool expected = false; if (!UTParamUtil::GetBool(info[1],expected)) { DPRINTF(D_ERROR, ("HLXMapProf::HandleIsEmptyCmd : failed to convert parameter\n")); } else ret = IsEmpty(expected); return ret;}bool HLXMapProf::IsEmpty(bool expected){ bool ret = true; for (int i = 0; ret && (i < m_array.GetSize()); i++) { GenMapProfBase* pObj = (GenMapProfBase*)m_array[i]; if (pObj) ret = pObj->IsEmpty(expected); } return ret;}bool HLXMapProf::HandleLookupCmd(const UTVector<UTString>& info){ bool ret = false; int index = 0; bool expected = false; if (!UTParamUtil::GetInt(info[1], index) || !UTParamUtil::GetBool(info[2],expected)) { DPRINTF(D_ERROR, ("HLXMapProf::HandleLookupCmd : failed to convert parameter\n")); } else ret = Lookup(index, expected); return ret;}bool HLXMapProf::Lookup(int index, bool expected){ bool ret = true; for (int i = 0; ret && (i < m_array.GetSize()); i++) { GenMapProfBase* pObj = (GenMapProfBase*)m_array[i]; if (pObj) ret = pObj->Lookup(index, expected); } return ret;}bool HLXMapProf::HandleSetAtCmd(const UTVector<UTString>& info){ bool ret = false; int index = 0; if (!UTParamUtil::GetInt(info[1], index)) { DPRINTF(D_ERROR, ("HLXMapProf::HandleSetCmd : failed to convert parameter\n")); } else ret = SetAt(index); return ret;}bool HLXMapProf::SetAt(int index){ bool ret = true; for (int i = 0; ret && (i < m_array.GetSize()); i++) { GenMapProfBase* pObj = (GenMapProfBase*)m_array[i]; if (pObj) ret = pObj->SetAt(index); } return ret;}bool HLXMapProf::HandleRemoveKeyCmd(const UTVector<UTString>& info){ bool ret = false; int index = 0; bool expected = false; if (!UTParamUtil::GetInt(info[1], index) || !UTParamUtil::GetBool(info[2],expected)) { DPRINTF(D_ERROR, ("HLXMapProf::HandleRemoveKeyCmd : failed to convert parameter\n")); } else ret = RemoveKey(index, expected); return ret;}bool HLXMapProf::RemoveKey(int index, bool expected){ bool ret = true; for (int i = 0; ret && (i < m_array.GetSize()); i++) { GenMapProfBase* pObj = (GenMapProfBase*)m_array[i]; if (pObj) ret = pObj->RemoveKey(index, expected); } return ret;}bool HLXMapProf::HandleRemoveAllCmd(const UTVector<UTString>& /*info*/){ bool ret = true; for (int i = 0; ret && (i < m_array.GetSize()); i++) { GenMapProfBase* pObj = (GenMapProfBase*)m_array[i]; if (pObj) ret = pObj->RemoveAll(); } return ret;}bool HLXMapProf::HandleRhsArrayOpCmd(const UTVector<UTString>& info){ bool ret = false; int index = 0; bool expected = false; if (!UTParamUtil::GetInt(info[1], index) || !UTParamUtil::GetBool(info[2], expected)) { DPRINTF(D_ERROR, ("HLXMapProf::HandleRhsArrayOpCmd : failed to convert parameter\n")); } else { ret = RhsArrayOp(index, expected); } return ret;}bool HLXMapProf::RhsArrayOp(int index, bool expected){ bool ret = true; for (int i = 0; ret && (i < m_array.GetSize()); i++) { GenMapProfBase* pObj = (GenMapProfBase*)m_array[i]; if (pObj) { ret = pObj->RhsArrayOp(index, expected); } } return ret;}bool HLXMapProf::HandleLhsArrayOpCmd(const UTVector<UTString>& info){ bool ret = false; int index = 0; if (!UTParamUtil::GetInt(info[1], index)) { DPRINTF(D_ERROR, ("HLXMapProf::HandleLhsArrayOpCmd : failed to convert parameter\n")); } else ret = LhsArrayOp(index); return ret;}bool HLXMapProf::LhsArrayOp(int index){ bool ret = true; for (int i = 0; ret && (i < m_array.GetSize()); i++) { GenMapProfBase* pObj = (GenMapProfBase*)m_array[i]; if (pObj) ret = pObj->LhsArrayOp(index); } return ret;}bool HLXMapProf::HandleIsNullCmd(const UTVector<UTString>& info){ bool ret = false; int index = 0; bool expected = false; if (!UTParamUtil::GetInt(info[1], index) || !UTParamUtil::GetBool(info[2], expected)) { DPRINTF(D_ERROR, ("HLXMapProf::HandleIsNullCmd : failed to convert parameter\n")); } else { ret = IsNull(index, expected); } return ret;}bool HLXMapProf::IsNull(int index, bool expected){ bool ret = true; for (int i = 0; ret && (i < m_array.GetSize()); i++) { GenMapProfBase* pObj = (GenMapProfBase*)m_array[i]; if (pObj) { ret = pObj->IsNull(index, expected); } } return ret;}bool HLXMapProf::HandleRunMapSpecificProfsCmd(const UTVector<UTString>& /*info*/){ bool ret = true; for (int i = 0; ret && (i < m_array.GetSize()); i++) { GenMapProfBase* pObj = (GenMapProfBase*)m_array[i]; if (pObj) ret = pObj->RunMapSpecificProfs(); } return ret;}bool HLXMapProf::HandleProfileInsertionsCmd(const UTVector<UTString>& info){ bool ret = false; int typeIdx = -1; if (!UTParamUtil::GetInt(info[1], typeIdx) || (typeIdx < 0 || typeIdx >= m_array.GetSize())) { DPRINTF(D_ERROR, ("HLXMapProf::HandleProfileInsertionsCmd : failed to convert parameter\n")); } else { GenMapProfBase* pObj = (GenMapProfBase*)m_array[typeIdx]; if (pObj) ret = pObj->ProfileInsertions(m_typeArray[typeIdx]); } return ret;}bool HLXMapProf::HandleInitHashTableCmd(const UTVector<UTString>& info){ bool ret = false; int typeIdx = -1; int num = 0; if (!UTParamUtil::GetInt(info[1], typeIdx) || (typeIdx < 0 || typeIdx >= m_array.GetSize()) || !UTParamUtil::GetInt(info[2], num)) { DPRINTF(D_ERROR, ("HLXMapProf::HandleInitHashTableCmd : failed to convert parameter\n")); } else { GenMapProfBase* pObj = (GenMapProfBase*)m_array[typeIdx]; if (pObj) ret = pObj->InitHashTable(num); } return ret;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -