17 typedef std::vector<Resources::IBuiltResource*> TResourceVector;
18 TResourceVector m_resources;
20 int m_numOfPoolAllocates;
23 ResourceNode(
const std::vector<Resources::IBuiltResource*>& resources);
27 int count() {
return static_cast<int>(m_resources.size()); }
28 const std::vector<Resources::IBuiltResource*> &resources() {
return m_resources; }
31 void RemovedFromSceneGraph();
33 void SetAddedToPool(
void)
35 const bool notInCache = m_numOfPoolAdds == m_numOfPoolAllocates;
36 Eegeo_ASSERT(notInCache,
"ResourceNode should not be in cache (%d adds, %d removes)", m_numOfPoolAdds, m_numOfPoolAllocates);
40 void SetAllocatedFromPool(
void)
42 const bool isInCache = m_numOfPoolAdds == (m_numOfPoolAllocates + 1);
43 Eegeo_ASSERT(isInCache,
"ResourceNode should be in cache (%d adds, %d removes)", m_numOfPoolAdds, m_numOfPoolAllocates);
44 m_numOfPoolAllocates++;