Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/slots.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/core/slots.h b/src/core/slots.h
index aefffb7..6ac9eb8 100644
--- a/src/core/slots.h
+++ b/src/core/slots.h
@@ -38,16 +38,34 @@ public:
void clear();
/**
- * @brief found a mounted item
+ * @brief find a mounted item
* */
Slot *find(Item *item);
+ /**
+ * @brief return the slot at the specified index
+ * */
+ inline Slot *operator[](size_t index)
+ {
+ if (index < slots_container.size()) {
+ return slots_container[index];
+ } else {
+ return 0;
+ }
+ }
+
+ inline size_t size() const
+ {
+ return slots_container.size();
+ }
- inline iterator begin() {
+ inline iterator begin()
+ {
return slots_container.begin();
}
- inline iterator end() {
+ inline iterator end()
+ {
return slots_container.end();
}