- 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
This commit is contained in:
tchernobog 2006-09-17 20:22:46 +00:00
parent 972db124e6
commit c3f77d68a3
1 changed files with 38 additions and 20 deletions

View File

@ -31,43 +31,61 @@
namespace sgpem 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; 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 class ResourcePolicyPriority : public ResourcePolicy
{ {
public: public:
/// \brief Standard virtual destructor.
///
/// Standard virtual destructor.
virtual ~ResourcePolicyPriority(); virtual ~ResourcePolicyPriority();
/** /// \brief Initializes the inner components of the policy.
Initialize the inner components of the policy. ///
/// Does nothing.
Because it's a pure virtual method, must be re-implemented
in concrete derived classes.
*/
virtual void configure() throw(UserInterruptException); virtual void configure() throw(UserInterruptException);
/** /// \brief Sorts the subrequest queue letting higher priority threads to be the first ones
Mixes the queues. /// 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); virtual void enforce(Environment& environment, Environment::SubRequestQueue& queue, SubRequest& sr) throw(UserInterruptException);
/** /// \brief Returns a description of the policy.
Gets a string description of the policy. ///
/// Returns a description of the policy.
Because it's a pure virtual method, must be re-implemented /// \return a description of the policy.
in concrete derived classes.
\return String description of the policy.
*/
virtual Glib::ustring get_description() const; 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; virtual Glib::ustring get_name() const;
/// \brief Activates the policy.
///
/// Does nothing.
virtual void activate(); virtual void activate();
/// \brief Deactivates the policy.
///
/// Does nothing.
virtual void deactivate(); virtual void deactivate();
}; };