-
- // Register node definition
- virtual void set(content_t c, const ContentFeatures &def)=0;
- virtual ContentFeatures* getModifiable(content_t c)=0;
+ virtual bool getId(const std::string &name, content_t &result) const=0;
+ // If not found, returns CONTENT_IGNORE
+ virtual content_t getId(const std::string &name) const=0;
+ // Allows "group:name" in addition to regular node names
+ virtual void getIds(const std::string &name, std::set<content_t> &result)
+ const=0;
+ // If not found, returns the features of CONTENT_UNKNOWN
+ virtual const ContentFeatures& get(const std::string &name) const=0;
+
+ // Register node definition by name (allocate an id)
+ // If returns CONTENT_IGNORE, could not allocate id
+ virtual content_t set(const std::string &name,
+ const ContentFeatures &def)=0;
+ // If returns CONTENT_IGNORE, could not allocate id
+ virtual content_t allocateDummy(const std::string &name)=0;
+
+ /*
+ Update item alias mapping.
+ Call after updating item definitions.
+ */
+ virtual void updateAliases(IItemDefManager *idef)=0;