Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2010-11-13 14:25:39 +0000
committerStijn Buys <ingar@osirion.org>2010-11-13 14:25:39 +0000
commit871be21e83502a909620a5bcfcd09e3257ed0518 (patch)
tree8aee5b25fd5c3d43e55e1b92e114acca58c1172a /src/core/info.h
parent650cca5da5e15b9d4a85e7f734515f538b0cc0f3 (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.h25
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);