comparison 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
comparison
equal deleted inserted replaced
32:75b6394ced14 33:112fc4af772d
112 112
113 /** Returns pather corresponding given name. If none found, returns NULL 113 /** Returns pather corresponding given name. If none found, returns NULL
114 */ 114 */
115 AbstractPather* getPather(const std::string& pathername); 115 AbstractPather* getPather(const std::string& pathername);
116 116
117 /** Adds cellgrid to model. Moves ownership to model
118 */
119 void adoptCellGrid(CellGrid* grid);
120
121 /** Returns new copy of cellgrid corresponding given name. If none found, returns NULL
122 */
123 CellGrid* getCellGrid(const std::string& gridtype);
124
117 /** Called periodically to update events on model 125 /** Called periodically to update events on model
118 */ 126 */
119 void update(); 127 void update();
120 128
121 /** Sets speed for the model. With speed 1.0, everything runs with normal speed. 129 /** Sets speed for the model. With speed 1.0, everything runs with normal speed.
134 142
135 typedef std::pair<std::string, std::list<Object*> > namespace_t; 143 typedef std::pair<std::string, std::list<Object*> > namespace_t;
136 std::list<namespace_t> m_namespaces; 144 std::list<namespace_t> m_namespaces;
137 145
138 std::vector<AbstractPather*> m_pathers; 146 std::vector<AbstractPather*> m_pathers;
147 std::vector<CellGrid*> m_adopted_grids;
148 std::vector<CellGrid*> m_created_grids;
139 TimeProvider m_timeprovider; 149 TimeProvider m_timeprovider;
140 }; 150 };
141 151
142 }; //FIFE 152 }; //FIFE
143 #endif 153 #endif