comparison engine/core/model/model.h @ 617:69ef061db940

Removed the remaining size_t references that affected the FIFE API and replaced them with more appropriate definitions. The remaining size_t definitions will remain as they wont cause any issues. fixes[t:152]
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Mon, 27 Sep 2010 21:18:24 +0000
parents 9d94f4676d17
children
comparison
equal deleted inserted replaced
616:c770794d0a4a 617:69ef061db940
56 public: 56 public:
57 57
58 /** Constructor 58 /** Constructor
59 * 59 *
60 */ 60 */
61 Model(RenderBackend* renderbackend, const std::vector<RendererBase*>& renderers, 61 Model(RenderBackend* renderbackend, const std::vector<RendererBase*>& renderers,
62 ImagePool* imagepool, AnimationPool* animpool); 62 ImagePool* imagepool, AnimationPool* animpool);
63 63
64 /** Destructor 64 /** Destructor
65 * 65 *
66 */ 66 */
67 ~Model(); 67 ~Model();
68 68
69 /** Add a map this model, and get a pointer to it. 69 /** Add a map this model, and get a pointer to it.
70 * The returned pointer is owned by the Model, so don't delete it! 70 * The returned pointer is owned by the Model, so don't delete it!
71 */ 71 */
72 Map* createMap(const std::string& identifier); 72 Map* createMap(const std::string& identifier);
73 73
85 */ 85 */
86 Map* getMap(const std::string& identifier) const; 86 Map* getMap(const std::string& identifier) const;
87 87
88 /** Return the number of maps in this model 88 /** Return the number of maps in this model
89 */ 89 */
90 size_t getNumMaps() const; 90 uint32_t getNumMaps() const;
91 91
92 /** Removes all maps from this model 92 /** Removes all maps from this model
93 */ 93 */
94 void deleteMaps(); 94 void deleteMaps();
95 95
96 /** Get a list of namespaces currently referenced by objects in the metamodel. 96 /** Get a list of namespaces currently referenced by objects in the metamodel.
97 */ 97 */
98 std::list<std::string> getNamespaces() const; 98 std::list<std::string> getNamespaces() const;
99 99
100 /** Add an object to the metamodel. 100 /** Add an object to the metamodel.
101 * 101 *
102 * @param identifier A string for identifying this object; must be unique for its namespace. 102 * @param identifier A string for identifying this object; must be unique for its namespace.
103 * @param parent Objects may optionally inherit values from a parent object. 103 * @param parent Objects may optionally inherit values from a parent object.
104 * @note This object belongs to the model, so don't delete the returned pointer 104 * @note This object belongs to the model, so don't delete the returned pointer
105 */ 105 */
106 Object* createObject(const std::string& identifier, const std::string& name_space, Object* parent=0); 106 Object* createObject(const std::string& identifier, const std::string& name_space, Object* parent=0);
124 std::list<Object*> getObjects(const std::string& name_space) const; 124 std::list<Object*> getObjects(const std::string& name_space) const;
125 125
126 /** Adds pather to model. Moves ownership to model 126 /** Adds pather to model. Moves ownership to model
127 */ 127 */
128 void adoptPather(AbstractPather* pather); 128 void adoptPather(AbstractPather* pather);
129 129
130 /** Returns pather corresponding given name. If none found, returns NULL 130 /** Returns pather corresponding given name. If none found, returns NULL
131 */ 131 */
132 AbstractPather* getPather(const std::string& pathername); 132 AbstractPather* getPather(const std::string& pathername);
133 133
134 /** Adds cellgrid to model. Moves ownership to model 134 /** Adds cellgrid to model. Moves ownership to model
135 */ 135 */
136 void adoptCellGrid(CellGrid* grid); 136 void adoptCellGrid(CellGrid* grid);
137 137
138 /** Returns new copy of cellgrid corresponding given name. If none found, returns NULL 138 /** Returns new copy of cellgrid corresponding given name. If none found, returns NULL
139 */ 139 */
140 CellGrid* getCellGrid(const std::string& gridtype); 140 CellGrid* getCellGrid(const std::string& gridtype);
141 141
142 /** Called periodically to update events on model 142 /** Called periodically to update events on model
143 */ 143 */
144 void update(); 144 void update();
145 145
146 /** Sets speed for the model. With speed 1.0, everything runs with normal speed. 146 /** Sets speed for the model. With speed 1.0, everything runs with normal speed.
147 * With speed 2.0, clock is ticking twice as fast. With 0, everything gets paused. 147 * With speed 2.0, clock is ticking twice as fast. With 0, everything gets paused.
148 * Negavtive values are not supported (throws NotSupported exception). 148 * Negavtive values are not supported (throws NotSupported exception).
149 */ 149 */
150 void setTimeMultiplier(float multip) { m_timeprovider.setMultiplier(multip); } 150 void setTimeMultiplier(float multip) { m_timeprovider.setMultiplier(multip); }
151 151
152 /** Gets model speed. @see setTimeMultiplier. 152 /** Gets model speed. @see setTimeMultiplier.
153 */ 153 */
154 double getTimeMultiplier() const { return m_timeprovider.getMultiplier(); } 154 double getTimeMultiplier() const { return m_timeprovider.getMultiplier(); }
155 155
156 private: 156 private: