- Fix return types so that caller can modify the acquired vector
(when appropriate) - FIXME: see if const std::vector<Something*>& let you invoke a non-const method of *Something. Else copy these values to const std::vector<const Something*> before returning. git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@686 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
53da6e4bb8
commit
1c72695c2b
|
@ -59,7 +59,7 @@ ConcreteEnvironment::ConcreteEnvironment(const ConcreteEnvironment & c) :
|
|||
|
||||
|
||||
|
||||
const std::vector<Process *>
|
||||
const std::vector<Process*>&
|
||||
ConcreteEnvironment::get_processes() const
|
||||
{
|
||||
return _processes;
|
||||
|
@ -67,7 +67,7 @@ ConcreteEnvironment::get_processes() const
|
|||
|
||||
|
||||
|
||||
std::vector<Process *>
|
||||
std::vector<Process*>&
|
||||
ConcreteEnvironment::get_processes()
|
||||
{
|
||||
return _processes;
|
||||
|
@ -75,7 +75,7 @@ ConcreteEnvironment::get_processes()
|
|||
|
||||
|
||||
|
||||
const std::map<int, Resource *>
|
||||
const std::map<int, Resource*>&
|
||||
ConcreteEnvironment::get_resources() const
|
||||
{
|
||||
return _resources;
|
||||
|
@ -83,7 +83,7 @@ ConcreteEnvironment::get_resources() const
|
|||
|
||||
|
||||
|
||||
std::map<int, Resource *>
|
||||
std::map<int, Resource*>&
|
||||
ConcreteEnvironment::get_resources()
|
||||
{
|
||||
return _resources;
|
||||
|
@ -91,7 +91,7 @@ ConcreteEnvironment::get_resources()
|
|||
|
||||
|
||||
|
||||
const std::vector<Request *>
|
||||
const std::vector<Request*>
|
||||
ConcreteEnvironment::get_request_queue(Resource * resource) const
|
||||
{
|
||||
std::vector<Request *> request_queue;
|
||||
|
@ -102,18 +102,18 @@ ConcreteEnvironment::get_request_queue(Resource * resource) const
|
|||
|
||||
|
||||
|
||||
const ReadyQueue *
|
||||
const ReadyQueue&
|
||||
ConcreteEnvironment::get_sorted_queue() const
|
||||
{
|
||||
return &_sched_queue;
|
||||
return _sched_queue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
ReadyQueue *
|
||||
ReadyQueue&
|
||||
ConcreteEnvironment::get_sorted_queue()
|
||||
{
|
||||
return &_sched_queue;
|
||||
return _sched_queue;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ namespace sgpem
|
|||
///
|
||||
/// \return a constant set of snapshots of processes
|
||||
|
||||
virtual const std::vector<Process *>
|
||||
virtual const std::vector<Process*>&
|
||||
get_processes() const;
|
||||
|
||||
|
||||
|
@ -92,7 +92,7 @@ namespace sgpem
|
|||
/// \return a set of snapshots of processes
|
||||
/// \see get_processes()
|
||||
|
||||
virtual std::vector<Process *>
|
||||
virtual std::vector<Process*>&
|
||||
get_processes();
|
||||
|
||||
|
||||
|
@ -116,7 +116,7 @@ namespace sgpem
|
|||
/// \return a indexed constant set of snapshot of resources.
|
||||
/// \see DynamicSybrequest::get_resource()
|
||||
|
||||
virtual const std::map<int, Resource *>
|
||||
virtual const std::map<int, Resource*>&
|
||||
get_resources() const;
|
||||
|
||||
|
||||
|
@ -126,7 +126,7 @@ namespace sgpem
|
|||
/// \return an indexed set of snapshots of resources
|
||||
/// \see get_resources()
|
||||
|
||||
virtual std::map<int, Resource *>
|
||||
virtual std::map<int, Resource*>&
|
||||
get_resources();
|
||||
|
||||
|
||||
|
@ -143,7 +143,7 @@ namespace sgpem
|
|||
/// \param resource the resource the requests are for
|
||||
/// \return the current ready requests queue.
|
||||
|
||||
virtual const std::vector<Request *>
|
||||
virtual const std::vector<Request*>
|
||||
get_request_queue(Resource * resource) const;
|
||||
|
||||
|
||||
|
@ -156,7 +156,7 @@ namespace sgpem
|
|||
///
|
||||
/// \return the current ready queue (constant).
|
||||
|
||||
virtual const ReadyQueue *
|
||||
virtual const ReadyQueue&
|
||||
get_sorted_queue() const;
|
||||
|
||||
|
||||
|
@ -166,7 +166,7 @@ namespace sgpem
|
|||
/// \return the current ready queue.
|
||||
/// \see get_sorted_queue()
|
||||
|
||||
virtual ReadyQueue *
|
||||
virtual ReadyQueue&
|
||||
get_sorted_queue();
|
||||
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace sgpem
|
|||
///
|
||||
/// \return a constant set of snapshots of processes
|
||||
|
||||
virtual std::vector<Process *> const
|
||||
virtual const std::vector<Process*>&
|
||||
get_processes() const = 0;
|
||||
|
||||
|
||||
|
@ -80,7 +80,7 @@ namespace sgpem
|
|||
///
|
||||
/// \return an indexed constant set of snapshot of resources.
|
||||
|
||||
virtual std::map<int, Resource *> const
|
||||
virtual const std::map<int, Resource*>&
|
||||
get_resources() const = 0;
|
||||
|
||||
|
||||
|
@ -91,7 +91,7 @@ namespace sgpem
|
|||
/// \param resource the resource the requests are for
|
||||
/// \return the current ready requests queue (constant).
|
||||
|
||||
virtual std::vector<Resource *> const
|
||||
virtual const std::vector<Request*>
|
||||
get_request_queue(const Resource * resource) const = 0;
|
||||
|
||||
|
||||
|
@ -102,7 +102,7 @@ namespace sgpem
|
|||
/// of the CPU.
|
||||
/// \return the current ready queue (constant).
|
||||
|
||||
virtual const ReadyQueue *
|
||||
virtual const ReadyQueue&
|
||||
get_sorted_queue() const = 0;
|
||||
|
||||
|
||||
|
@ -110,8 +110,7 @@ namespace sgpem
|
|||
/// The standard virtual destructor.
|
||||
|
||||
virtual
|
||||
~Environment();
|
||||
|
||||
~Environment() = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue