- 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

1081
ChangeLog

File diff suppressed because it is too large Load Diff

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();

View File

@ -42,19 +42,49 @@ namespace sgpem {
// ---------------------------------------------
/** \brief
*
* ... long desc ... */
/** \brief Class GraphicalTerminalIO implements the methods requested
by IOManager using graphichal widgets.
Consists in a window displaying some textual output and providing a control for text input.
It is associated with a TextSimulaton, which provide the interpretation and elaboration of the user
commands.
*/
class GraphicalTerminalIO : public IOManager, public Gtk::Window
{
public:
GraphicalTerminalIO(TextSimulation* sim);
/**
Creates a GraphichalTerminalIO supported by the specified TextSimulation.
\param sim the TextSimulation that will support this IOManager.
*/
GraphicalTerminalIO(TextSimulation* sim);
/**
Destructor.
*/
virtual ~GraphicalTerminalIO();
virtual uint write_buffer(const Glib::ustring& buffer);
virtual Glib::ustring read_command();
/**
Prints on the window the provided buffer.
\param buffer the buffer to print.
*/
virtual uint write_buffer(const Glib::ustring& buffer);
/**
Reads the user input.
\return the user input.
*/
virtual Glib::ustring read_command();
/**
Returns whether the IOManager can read user input while performing a write operation.
\return whether the IOManager can read user input while performing a write operation.
*/
virtual bool is_full_duplex();
/**
Specifies the operations to perform at user input.
*/
void onSend();
private:

View File

@ -37,7 +37,7 @@
*/
void parse_options(int& argc, char**& argv);
/** \brief Prints license notice text to stderr **/
/** \brief Prints license notice text to stderr */
void print_license();
#endif