diff engine/core/model/model.h @ 33:112fc4af772d

moved grid ownership to model in similar way as with pathers
author jasoka@33b003aa-7bff-0310-803a-e67f0ece8222
date Fri, 11 Jul 2008 15:42:54 +0000
parents 4a0efb7baf70
children bf7f838e6684
line wrap: on
line diff
--- a/engine/core/model/model.h	Fri Jul 11 15:37:16 2008 +0000
+++ b/engine/core/model/model.h	Fri Jul 11 15:42:54 2008 +0000
@@ -114,6 +114,14 @@
 		 */
 		AbstractPather* getPather(const std::string& pathername);
 		
+		/** Adds cellgrid to model. Moves ownership to model
+		 */
+		void adoptCellGrid(CellGrid* grid);
+		
+		/** Returns new copy of cellgrid corresponding given name. If none found, returns NULL
+		 */
+		CellGrid* getCellGrid(const std::string& gridtype);
+		
 		/** Called periodically to update events on model
 		 */
 		void update();
@@ -136,6 +144,8 @@
 		std::list<namespace_t> m_namespaces;
 
 		std::vector<AbstractPather*> m_pathers;
+		std::vector<CellGrid*> m_adopted_grids;
+		std::vector<CellGrid*> m_created_grids;
 		TimeProvider m_timeprovider;
 	};