diff options
author | Stijn Buys <ingar@osirion.org> | 2010-11-13 14:25:39 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-11-13 14:25:39 +0000 |
commit | 871be21e83502a909620a5bcfcd09e3257ed0518 (patch) | |
tree | 8aee5b25fd5c3d43e55e1b92e114acca58c1172a /src/core/info.h | |
parent | 650cca5da5e15b9d4a85e7f734515f538b0cc0f3 (diff) |
corrected a bug where ship names got erased,
made core::Entity::info() const, added core::Info::find() to get non-const *core::Info pointers
Diffstat (limited to 'src/core/info.h')
-rw-r--r-- | src/core/info.h | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/core/info.h b/src/core/info.h index b8154d7..d32ccab 100644 --- a/src/core/info.h +++ b/src/core/info.h @@ -191,23 +191,38 @@ private: /* ---- static info registry --------------------------------------- */ public: - /// info registry type definition + /** + * @brief info registry type definition + */ typedef std::vector<Info*> Registry; - /// the info registry + /** + * @brief the info registry + */ static inline Registry & registry() { return info_registry; } - /// search the info registry for a record with the specified id + /** + * @brief search the info registry for a record with the specified id + */ static Info *find(const unsigned int id); - /// search the info registry for a labeled item + /** + * @brief search the info registry for a labeled item + */ static Info *find(const char * label); - /// search the info registry for a label + /** + * @brief search the info registry for a label + */ static Info *find(const std::string & label); + /** + * @brief search the info register for a pointer + */ + static Info *find(const Info *info); + /// search the info registry for a record with a matching label or name static Info *search(const std::string & searchstr); |