- Added documentation to some headers

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@438 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
matrevis 2006-02-24 13:19:27 +00:00
parent 52857f08b9
commit 5034c59728
5 changed files with 670 additions and 510 deletions

View file

@ -38,9 +38,11 @@ namespace sgpem
class SG_DLLEXPORT Process : public Schedulable
{
public:
/** \brief Creates a new object with the given parameters. */
Process(const Glib::ustring& name, const unsigned int& arrival, const unsigned int& total, const int& priority);
/** \brief Destructor. */
~Process();
/** \brief Returns a string describing the type of the object. */
Glib::ustring get_type() const;
private:

View file

@ -38,25 +38,70 @@ namespace sgpem
{
class Scheduler;
/** \brief
/** \brief Manages the SchedulableStatus objects, implementing a given policy.
Class Scheduler manages the schedulable entities which are ready to run,
ordering them in a queue; it also checks that the current scheduling policy
is well-defined and does not disrupt the application inner mechanism.
It is also responsible for the creation and the destruction of some of
the SchedulableStatus objects (for further details about this, check
class SchedulableStatus).
*/
class SG_DLLEXPORT Scheduler
{
public:
/** The events that may cause the need for updating the scheduling queue
and/or the running process.
*/
enum event
{
/**
The arrival of a newly-created process.
*/
event_schedulable_arrival,
/**
The termination of the executing process.
*/
event_schedulable_termination,
/**
The end of the executing process' time quantum.
*/
event_end_time_slice
};
/**
Returns the unique instance of this class, conforming to the Singleton pattern.
\return the unique instance of this class, conforming to the Singleton pattern.
*/
static Scheduler& get_instance();
/**
Returns a pointer to the queue containing all the ready
schedulable objects (for the policy to sort it).
\return a pointer to the queue containing all the ready
schedulable objects (for the policy to sort it).
*/
SchedulableList* get_ready_queue();
/**
Resets the simulation to the initial state.
*/
void reset_status();
/**
Generates a new SchedulableList representing the status of the processes
at the simulation instant next to the current one, and extends the History by
one instant with it.
*/
void step_forward();
void set_policy(Policy*);
/**
Sets the policy that will be used to generate the simulation at the next instant.
\param policy the policy that will be used to generate the simulation at the next instant.
*/
void set_policy(Policy* policy);
/**
Returns the policy that will be used to generate the simulation at the next instant.
\return the policy that will be used to generate the simulation at the next instant.
*/
Policy* get_policy();