From c3f77d68a3be97d6105abc11b39b9f32580722c9 Mon Sep 17 00:00:00 2001 From: tchernobog Date: Sun, 17 Sep 2006 20:22:46 +0000 Subject: [PATCH] - Valiantly recuperate Marco's comments in ResourcePolicyPriority with the aid of GNU Emacs git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1255 3ecf2c5c-341e-0410-92b4-d18e462d057c --- src/backend/resource_policy_priority.hh | 58 ++++++++++++++++--------- 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/src/backend/resource_policy_priority.hh b/src/backend/resource_policy_priority.hh index 1d29c56..3aa27f1 100644 --- a/src/backend/resource_policy_priority.hh +++ b/src/backend/resource_policy_priority.hh @@ -31,43 +31,61 @@ namespace sgpem { + + /// \brief A resource allocation policy which provides a better service + /// to higer priority threads. + /// + /// A resource allocation policy which provides a better service + /// to higer priority threads. This policy sorts the request queues + /// following the priority of the owners of the requests. class ResourcePolicyPriority; - /** \brief - It's a Strategy wich stay for a resource allocating algorithm. - It implements the related resource allocation policy. - */ class ResourcePolicyPriority : public ResourcePolicy { public: + + /// \brief Standard virtual destructor. + /// + /// Standard virtual destructor. virtual ~ResourcePolicyPriority(); - /** - Initialize the inner components of the policy. - - Because it's a pure virtual method, must be re-implemented - in concrete derived classes. - */ + /// \brief Initializes the inner components of the policy. + /// + /// Does nothing. virtual void configure() throw(UserInterruptException); - /** - Mixes the queues. - */ + /// \brief Sorts the subrequest queue letting higher priority threads to be the first ones + /// to get the resources. + /// + /// Sorts the subrequest queue letting higher priority threads to be the first ones + /// to get the resources. + /// + /// \param environment the environment on which the policy applies. + /// \param queue the queue where a subrequest has just been added. + /// \param sr the subrequest which has just been added. virtual void enforce(Environment& environment, Environment::SubRequestQueue& queue, SubRequest& sr) throw(UserInterruptException); - /** - Gets a string description of the policy. - - Because it's a pure virtual method, must be re-implemented - in concrete derived classes. - \return String description of the policy. - */ + /// \brief Returns a description of the policy. + /// + /// Returns a description of the policy. + /// \return a description of the policy. virtual Glib::ustring get_description() const; + /// \brief Returns the name of the policy. + /// + /// Returns the name of the policy. + /// \return the name of the policy. virtual Glib::ustring get_name() const; + + /// \brief Activates the policy. + /// + /// Does nothing. virtual void activate(); + /// \brief Deactivates the policy. + /// + /// Does nothing. virtual void deactivate(); };