CvPlotManager::AddLayer(uint)
- Defined in
- CvPlotManager.cpp, line 167
- Class
- CvPlotManager
- Hook name
CivHooks::CvPlotManager_AddLayer
Hooks
static bool BeforeCvPlotManager_AddLayer(CvPlotManager* self, uint uiLayerID, CvSparseIDInfoGrid*& result);static void AfterCvPlotManager_AddLayer(CvPlotManager* self, uint uiLayerID, CvSparseIDInfoGrid*& result);static CvSparseIDInfoGrid* ReplaceCvPlotManager_AddLayer(CvSparseIDInfoGrid* (*original)(CvPlotManager*, uint), CvPlotManager* self, uint uiLayerID);CivRegisterBefore<CivHooks::CvPlotManager_AddLayer>(host, &BeforeCvPlotManager_AddLayer);CivRegisterAfter<CivHooks::CvPlotManager_AddLayer>(host, &AfterCvPlotManager_AddLayer);CivRegisterReplace<CivHooks::CvPlotManager_AddLayer>(host, &ReplaceCvPlotManager_AddLayer);
Code
167CvSparseIDInfoGrid* CvPlotManager::AddLayer(uint uiLayerID)168{169 for (CvSparseIDInfoGridVector::const_iterator itr = m_aLayers.begin(); itr != m_aLayers.end(); ++itr)170 {171 if ((*itr).m_uiID == uiLayerID)172 {173 return (*itr).m_pkGrid;174 }175 }176177 CvSparseIDInfoGrid* pkLayer = new CvSparseIDInfoGrid(m_uiWidth, m_uiHeight, &m_kAllocator);178 m_aLayers.push_back(CvSparseIDInfoGridEntry(uiLayerID, pkLayer));179180 return pkLayer;181}
Calls
- CvSparseIDInfoGrid::CvSparseIDInfoGrid(uint, uint, CvIDInfoFixedVectorAllocator *)
- CvSparseIDInfoGridEntry::CvSparseIDInfoGridEntry(uint, CvSparseIDInfoGrid *)
std::_Vector_const_iterator::_Vector_const_iteratorstd::_Vector_const_iterator::operator!=std::_Vector_const_iterator::operator*std::_Vector_const_iterator::operator++std::vector::beginstd::vector::endstd::vector::push_back