@@ -265,9 +265,9 @@ struct ContentFeatures
265
265
ContentFeatures ();
266
266
~ContentFeatures ();
267
267
void reset ();
268
- void serialize (std::ostream &os, u16 protocol_version);
268
+ void serialize (std::ostream &os, u16 protocol_version) const ;
269
269
void deSerialize (std::istream &is);
270
- void serializeOld (std::ostream &os, u16 protocol_version);
270
+ void serializeOld (std::ostream &os, u16 protocol_version) const ;
271
271
void deSerializeOld (std::istream &is, int version);
272
272
273
273
/*
@@ -288,48 +288,44 @@ enum NodeResolveMethod {
288
288
NODE_RESOLVE_DEFERRED,
289
289
};
290
290
291
- class INodeDefManager
292
- {
291
+ class INodeDefManager {
293
292
public:
294
293
INodeDefManager (){}
295
294
virtual ~INodeDefManager (){}
296
295
// Get node definition
297
- virtual const ContentFeatures& get (content_t c) const =0;
298
- virtual const ContentFeatures& get (const MapNode &n) const =0;
296
+ virtual const ContentFeatures & get (content_t c) const =0;
297
+ virtual const ContentFeatures & get (const MapNode &n) const =0;
299
298
virtual bool getId (const std::string &name, content_t &result) const =0;
300
299
virtual content_t getId (const std::string &name) const =0;
301
300
// Allows "group:name" in addition to regular node names
302
301
virtual void getIds (const std::string &name, std::set<content_t > &result)
303
302
const =0;
304
- virtual const ContentFeatures& get (const std::string &name) const =0;
303
+ virtual const ContentFeatures & get (const std::string &name) const =0;
305
304
306
- virtual void serialize (std::ostream &os, u16 protocol_version)=0;
305
+ virtual void serialize (std::ostream &os, u16 protocol_version) const =0;
307
306
308
307
virtual bool getNodeRegistrationStatus () const =0;
309
- virtual void setNodeRegistrationStatus (bool completed)=0;
310
308
311
309
virtual void pendNodeResolve (NodeResolver *nr, NodeResolveMethod how)=0;
312
310
virtual bool cancelNodeResolveCallback (NodeResolver *nr)=0;
313
- virtual void runNodeResolveCallbacks ()=0;
314
311
};
315
312
316
- class IWritableNodeDefManager : public INodeDefManager
317
- {
313
+ class IWritableNodeDefManager : public INodeDefManager {
318
314
public:
319
315
IWritableNodeDefManager (){}
320
316
virtual ~IWritableNodeDefManager (){}
321
317
virtual IWritableNodeDefManager* clone ()=0;
322
318
// Get node definition
323
- virtual const ContentFeatures& get (content_t c) const =0;
324
- virtual const ContentFeatures& get (const MapNode &n) const =0;
319
+ virtual const ContentFeatures & get (content_t c) const =0;
320
+ virtual const ContentFeatures & get (const MapNode &n) const =0;
325
321
virtual bool getId (const std::string &name, content_t &result) const =0;
326
322
// If not found, returns CONTENT_IGNORE
327
323
virtual content_t getId (const std::string &name) const =0;
328
324
// Allows "group:name" in addition to regular node names
329
325
virtual void getIds (const std::string &name, std::set<content_t > &result)
330
- const =0;
326
+ const =0;
331
327
// If not found, returns the features of CONTENT_UNKNOWN
332
- virtual const ContentFeatures& get (const std::string &name) const =0;
328
+ virtual const ContentFeatures & get (const std::string &name) const =0;
333
329
334
330
// Register node definition by name (allocate an id)
335
331
// If returns CONTENT_IGNORE, could not allocate id
@@ -348,10 +344,10 @@ class IWritableNodeDefManager : public INodeDefManager
348
344
Update tile textures to latest return values of TextueSource.
349
345
*/
350
346
virtual void updateTextures (IGameDef *gamedef,
351
- /* argument: */ void (*progress_callback )(void *progress_args, u32 progress, u32 max_progress),
352
- /* argument: */ void *progress_callback_args )=0;
347
+ void (*progress_cbk )(void *progress_args, u32 progress, u32 max_progress),
348
+ void *progress_cbk_args )=0;
353
349
354
- virtual void serialize (std::ostream &os, u16 protocol_version)=0;
350
+ virtual void serialize (std::ostream &os, u16 protocol_version) const =0;
355
351
virtual void deSerialize (std::istream &is)=0;
356
352
357
353
virtual bool getNodeRegistrationStatus () const =0;
@@ -360,6 +356,7 @@ class IWritableNodeDefManager : public INodeDefManager
360
356
virtual void pendNodeResolve (NodeResolver *nr, NodeResolveMethod how)=0;
361
357
virtual bool cancelNodeResolveCallback (NodeResolver *nr)=0;
362
358
virtual void runNodeResolveCallbacks ()=0;
359
+ virtual void resetNodeResolveState ()=0;
363
360
};
364
361
365
362
IWritableNodeDefManager *createNodeDefManager ();
0 commit comments