From 162645ed1caf9bb7f4204d5d51bd441ec2b0f46e Mon Sep 17 00:00:00 2001 From: Benedikt Galbavy Date: Sat, 3 Feb 2024 17:30:33 +0100 Subject: [PATCH] added documentation for manager --- Doxyfile | 2 +- include/Manager.h | 27 +++++++++++++++++++-------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/Doxyfile b/Doxyfile index 78f37c4..73e4e15 100644 --- a/Doxyfile +++ b/Doxyfile @@ -396,7 +396,7 @@ AUTOLINK_SUPPORT = YES # diagrams that involve STL classes more complete and accurate. # The default value is: NO. -BUILTIN_STL_SUPPORT = NO +BUILTIN_STL_SUPPORT = YES # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. diff --git a/include/Manager.h b/include/Manager.h index 61a1c45..1e2fff7 100644 --- a/include/Manager.h +++ b/include/Manager.h @@ -7,22 +7,33 @@ #include "Constants.h" #include "Entity.h" +/*! + * + * \brief Is responsible for managing all entities + * \details The manager class handles update and draw calls collectively for all entities, and provides functionality to get all or a subset of all entities + * \sa Entity + * \sa Entity::GroupLabel + * \sa Entity::TeamLabel + * + */ class Manager { public: - void update(); - void draw(); + void update(); //!< \sa Entity::update() + void draw(); //!< \sa Entity::draw() + //! Disables all functionality of entities marked for destruction + //! \sa Entity::destroy() void refresh(); - void addToGroup(Entity* mEntity, Group mGroup); - std::vector& getGroup(Group mGroup); + void addToGroup(Entity* mEntity, Group mGroup); //!< \todo `friend` to Entity + std::vector& getGroup(Group mGroup); //!< \returns std::vector containing all entities in group Entity::GroupLabel - void addToTeam(Entity* mEntity, Team mTeam); - std::vector& getTeam(Team mTeam); + void addToTeam(Entity* mEntity, Team mTeam); //!< \todo `friend` to Entity + std::vector& getTeam(Team mTeam); //!< \returns std::vector containing all entities in team Entity::TeamLabel - std::vector getAll(); + std::vector getAll(); //!< \returns std::vector containing all entities - Entity& addEntity(); + Entity& addEntity(); //!< Creates and returns a new, empty entity private: std::vector> entities;