diff options
Diffstat (limited to 'src/core/slot.h')
-rw-r--r-- | src/core/slot.h | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/src/core/slot.h b/src/core/slot.h index 2d636b3..5cfeb3e 100644 --- a/src/core/slot.h +++ b/src/core/slot.h @@ -22,7 +22,7 @@ namespace core * */ class Slot { public: - enum Flags {Active = 1}; + enum Flags {Mounted = 1, Active = 2}; /** * @brief default constructor @@ -52,6 +52,30 @@ public: } /** + * @brief slot flags + * */ + inline const unsigned int flags() const + { + return slot_flags; + } + + /** + * @brief return true if a specified flag is set + * */ + inline const bool has_flag(const Flags flag) + { + return ( (slot_flags & flag) == flag ); + } + + /** + * @brief the item this slot is holding + * */ + inline core::Item *item() + { + return slot_item; + } + + /** * @brief timestamp indicating when the slot was last fired,server-side * This is a server-side property * */ @@ -128,6 +152,16 @@ public: } /** + * @brief set a specified flags + * */ + void set_flag(const Flags flag); + + /** + * @brief unset a specified flags + * */ + void unset_flag(const Flags flag); + + /** * @brief set the slot's timestamp * The timestamp indicates when the slot's configuration was last changed. * */ |