#ifndef __SLOTLIST_H__ #define __SLOTLIST_H__ #include namespace act { class ISlot; class IToken; } class SlotEntry { public: SlotEntry(); SlotEntry(const SlotEntry& old_entry); void init(act::ISlot* slot_blueprint); ~SlotEntry(); void invalidate_token(); void preload_token(); inline act::ISlot* getSlot() const { return m_slot; } act::IToken* getToken(); private: void cleanup(); act::ISlot* m_slot; act::IToken* m_token; }; /*! * Holds a list of the present slots in the system * TODO: Slot addition/removal detection */ class SlotList { public: typedef std::vector slot_list_t; SlotList(); SlotList(size_t expected_size); ~SlotList(); void reserve(size_t expected_size); void addSlot(act::ISlot* slot); void removeSlot(act::ISlot* slot); void clear(); act::ISlot* getSlot(size_t index); act::IToken* getToken(size_t index); inline size_t getNumSlots() { return m_slot_list.size(); } private: slot_list_t m_slot_list; }; #endif