7 #ifndef NDK_ENTITYLIST_HPP 8 #define NDK_ENTITYLIST_HPP 10 #include <Nazara/Core/Bitset.hpp> 11 #include <NDK/Prerequesites.hpp> 12 #include <NDK/Entity.hpp> 23 using size_type = std::size_t;
32 inline bool Has(
const Entity* entity)
const;
33 inline bool Has(EntityId entity)
const;
35 inline void Insert(Entity* entity);
37 inline void Remove(Entity* entity);
38 inline void Reserve(std::size_t entityCount);
41 inline iterator begin()
const;
42 inline bool empty()
const;
43 inline iterator end()
const;
44 inline size_type size()
const;
50 inline std::size_t FindNext(std::size_t currentId)
const;
51 inline World* GetWorld()
const;
52 inline void NotifyEntityDestruction(
const Entity* entity);
58 class NDK_API EntityList::iterator :
public std::iterator<std::forward_iterator_tag, const EntityHandle>
63 inline iterator(
const iterator& it);
67 inline iterator& operator=(
const iterator& it);
68 inline iterator& operator++();
69 inline iterator operator++(
int);
71 friend inline bool operator==(
const iterator& lhs,
const iterator& rhs);
72 friend inline bool operator!=(
const iterator& lhs,
const iterator& rhs);
74 friend inline void swap(iterator& lhs, iterator& rhs);
77 inline iterator(
const EntityList* world, std::size_t nextId);
79 std::size_t m_nextEntityId;
80 const EntityList* m_list;
84 #include <NDK/EntityList.inl> 86 #endif // NDK_ENTITYLIST_HPP TODO: For now is unable to display different color in the history, it needs a RichTextDrawer to do so...
Definition: Algorithm.hpp:12
NDK class that represents an entity in a world.
Definition: Entity.hpp:28
NDK class that represents a set of entities to help performing batch operations.
Definition: EntityList.hpp:16
NDK class that represents a world.
Definition: World.hpp:25