CvPlotManager::GetUnits(int, int, uint) const
- Defined in
- CvPlotManager.cpp, line 212
- Class
- CvPlotManager
- Hook name
CivHooks::CvPlotManager_GetUnits
Hooks
static bool BeforeCvPlotManager_GetUnits(const CvPlotManager* self, int iX, int iY, uint uiLayerID, const CvIDInfoFixedVector*& result);static void AfterCvPlotManager_GetUnits(const CvPlotManager* self, int iX, int iY, uint uiLayerID, const CvIDInfoFixedVector*& result);static const CvIDInfoFixedVector & ReplaceCvPlotManager_GetUnits(const CvIDInfoFixedVector & (*original)(const CvPlotManager*, int, int, uint), const CvPlotManager* self, int iX, int iY, uint uiLayerID);CivRegisterBefore<CivHooks::CvPlotManager_GetUnits>(host, &BeforeCvPlotManager_GetUnits);CivRegisterAfter<CivHooks::CvPlotManager_GetUnits>(host, &AfterCvPlotManager_GetUnits);CivRegisterReplace<CivHooks::CvPlotManager_GetUnits>(host, &ReplaceCvPlotManager_GetUnits);
Code
212const CvIDInfoFixedVector &CvPlotManager::GetUnits(int iX, int iY, uint uiLayerID) const213{214 if (uiLayerID != (uint)-1)215 {216 for (CvSparseIDInfoGridVector::const_iterator itr = m_aLayers.begin(); itr != m_aLayers.end(); ++itr)217 {218 if ((*itr).m_uiID == uiLayerID)219 {220 const CvIDInfoFixedVector* pkEntry = (*itr).m_pkGrid->Get(iX, iY);221 if (pkEntry)222 return *pkEntry;223 }224 }225 }226227 return m_kEmpty;228}
Calls
- CvSparseIDInfoGrid::Get(int, int) const
std::_Vector_const_iterator::operator!=std::_Vector_const_iterator::operator*std::_Vector_const_iterator::operator++std::vector::beginstd::vector::end