Documented history.hh, policy.hh, policy_manager.hh, slice.hh - ps

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@419 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
paolo 2006-02-24 01:06:49 +00:00
parent 3a38a2d3a6
commit 02e69f9214
4 changed files with 168 additions and 35 deletions

View file

@ -50,20 +50,50 @@ namespace sgpem
class SG_DLLEXPORT History : public ObservedSubject
{
public:
memory::smart_ptr<sgpem::SchedulableStatus> get_scheduled_at(int time) const;
memory::smart_ptr<sgpem::SchedulableList> get_simulation_status_at(int time) const;
int get_current_time() const;
void enqueue_slice(const sgpem::SchedulableList& status);
void truncate_at(int instant);
static History& get_instance();
/**
Gets the \ref Schedulable object running at the specified time.
\param time The inquired time instant.
\return The Schedulable object running at the given time.
*/
memory::smart_ptr<sgpem::SchedulableStatus> get_scheduled_at(int time) const;
/**
Gets the status of simulation at the specified time.
\param time The inquired time instant.
\return The list of Schedulable status objects at the specified time.
*/
memory::smart_ptr<sgpem::SchedulableList> get_simulation_status_at(int time) const;
/**
Gets the current time.
\return The current history time.
*/
int get_current_time() const;
/**
Sets the status of simulation at the current time.
\param status The list of \ref Schedulable status objects at the current time.
*/
void enqueue_slice(const sgpem::SchedulableList& status);
/**
Remove all data in History following the specified time.
\param instant Desired cutting time.
*/
void truncate_at(int instant);
/**
Gets the only instance of History.
\return The Singleton instance of this object.
*/
static History& get_instance();
private:
History(int); //private constructor. The parameter is discarded
static History _instance;
int _total_time_elapsed;
std::vector<sgpem::Slice> _slices;
History(int); //private constructor. The parameter is discarded
static History _instance;
int _total_time_elapsed;
std::vector<sgpem::Slice> _slices;
};
}//~ namespace sgpem