- Pretty-indenting code

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@674 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-06-29 08:44:30 +00:00
parent 7aecc910ba
commit 6b27a8461b
94 changed files with 3073 additions and 3066 deletions

View file

@ -38,65 +38,65 @@
namespace sgpem
{
/** \brief Manages the history of the simulation
Manages the history of the simulation from the instant 0 to the current time,
i.e. permits to know the state of each schedulable object inside this time interval.
In particoular it's possible to know which entity was running at a precise moment.
In a future iteration it will be possible to revert the entire simulation to a state
present in the history ("undo operation")
/** \brief Manages the history of the simulation
Manages the history of the simulation from the instant 0 to the current time,
i.e. permits to know the state of each schedulable object inside this time interval.
In particoular it's possible to know which entity was running at a precise moment.
In a future iteration it will be possible to revert the entire simulation to a state
present in the history ("undo operation")
*/
class History;
class SG_DLLEXPORT History : public Singleton<History>, public ObservedSubject
class SG_DLLEXPORT History : public Singleton<History>, public ObservedSubject
{
friend class Singleton<History>;
public:
/**
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.
*/
virtual memory::smart_ptr<sgpem::DynamicSchedulable> get_scheduled_at(int time) const;
/**
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.
*/
virtual memory::smart_ptr<sgpem::DynamicSchedulable> 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.
*/
virtual memory::smart_ptr<sgpem::SchedulableQueue> get_simulation_status_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.
*/
virtual memory::smart_ptr<sgpem::SchedulableQueue> get_simulation_status_at(int time) const;
/**
Gets the current time.
\return The current history time.
*/
virtual int get_current_time() const;
/**
Gets the current time.
\return The current history time.
*/
virtual 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.
*/
virtual void enqueue_slice(const sgpem::SchedulableQueue& status);
/**
Sets the status of simulation at the current time.
\param status The list of \ref Schedulable status objects at the current time.
*/
virtual void enqueue_slice(const sgpem::SchedulableQueue& status);
/**
Remove all data in History following the specified time.
\param instant Desired cutting time.
*/
virtual void truncate_at(int instant);
/**
Remove all data in History following the specified time.
\param instant Desired cutting time.
*/
virtual void truncate_at(int instant);
protected:
History(); //private constructor.
History(const History&);
History& operator=(const History&);
History(); //private constructor.
History(const History&);
History& operator=(const History&);
private:
int _total_time_elapsed;
std::vector<sgpem::Slice> _slices;
int _total_time_elapsed;
std::vector<sgpem::Slice> _slices;
};
}//~ namespace sgpem
#endif //HISTORY_H