From 925e8e7671eb5d91b7ecbc54e425ceb5f57bccd2 Mon Sep 17 00:00:00 2001 From: jinx Date: Sun, 17 Sep 2006 01:16:37 +0000 Subject: [PATCH] auditing performed, made some changes like removed std, or corrected the name of the file, and in come cases added the licence text where it was missing --gv git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1218 3ecf2c5c-341e-0410-92b4-d18e462d057c --- src/backend/concrete_simulation.cc | 10 +++------- src/backend/dynamic_thread.cc | 11 ++++------- src/backend/history.cc | 8 +++++--- src/backend/null_policy_exception.cc | 4 +++- src/backend/plugin_manager.cc | 1 - src/backend/resource.cc | 3 ++- src/backend/resource_policy_priority.cc | 4 ++-- src/backend/schedulable_statistics.cc | 8 +++++--- src/backend/serializers_gatekeeper.cc | 5 +++-- src/backend/sgpemv2/process.hh | 4 ++-- src/backend/sgpemv2/resource_policy_fifo.hh | 2 +- src/backend/sgpemv2/resource_policy_manager.hh | 2 +- src/backend/sgpemv2/templates/smartp.hh | 6 +++++- src/backend/sgpemv2/thread.hh | 4 ++-- 14 files changed, 38 insertions(+), 34 deletions(-) diff --git a/src/backend/concrete_simulation.cc b/src/backend/concrete_simulation.cc index 1041204..f0948c0 100644 --- a/src/backend/concrete_simulation.cc +++ b/src/backend/concrete_simulation.cc @@ -32,9 +32,9 @@ #include #include #include +#include #include -using namespace std; using namespace sgpem; using namespace memory; @@ -216,10 +216,6 @@ ConcreteSimulation::set_policy(CPUPolicy* p) throw(CPUPolicyException) { stop(); - // NOTE: restoring of the previous policy is done here because I - // couldn't think of a clean way to do it - // inside activate_policy() - try { CPUPoliciesGatekeeper::get_instance().activate_policy(&_history, p); @@ -236,13 +232,13 @@ ConcreteSimulation::set_policy(CPUPolicy* p) throw(CPUPolicyException) { _policy = NULL; - string msg = _("unable to change policy and to restore the previous: "); + std::string msg = _("unable to change policy and to restore the previous: "); msg += e2.what(); throw CPUPolicyException(msg); } - string msg = _("unable to change policy: "); + std::string msg = _("unable to change policy: "); msg+= e1.what(); throw CPUPolicyException(msg); diff --git a/src/backend/dynamic_thread.cc b/src/backend/dynamic_thread.cc index 3af14b3..0c1ad25 100644 --- a/src/backend/dynamic_thread.cc +++ b/src/backend/dynamic_thread.cc @@ -31,8 +31,6 @@ #include using namespace sgpem; -using namespace std; - DynamicThread::DynamicThread(StaticThread* core, DynamicProcess* parent) : DynamicSchedulable(), _core(core), _state(state_future), _parent(parent), @@ -53,11 +51,11 @@ DynamicThread::DynamicThread(const DynamicThread &other, DynamicProcess* parent) _ran_for(other._ran_for), _last_acquisition(other._last_acquisition), _last_release(other._last_release) { - typedef vector::const_iterator ReqIt; + typedef std::vector::const_iterator ReqIt; assert(parent != NULL); - const vector& other_req = other._dynamic_requests; + const std::vector& other_req = other._dynamic_requests; for (ReqIt it = other_req.begin(); it != other_req.end(); ++it) new DynamicRequest(*(*it), this); @@ -96,16 +94,15 @@ DynamicThread::set_state(state new_state) return old_state; } -vector +std::vector DynamicThread::get_requests() { - return vector(_dynamic_requests.begin(), _dynamic_requests.end()); + return std::vector(_dynamic_requests.begin(), _dynamic_requests.end()); } void DynamicThread::serialize(SerializeVisitor& translator) const { - //translator.from_thread(*_core); translator.from_thread(*this); } diff --git a/src/backend/history.cc b/src/backend/history.cc index 54a116f..2dfbb73 100644 --- a/src/backend/history.cc +++ b/src/backend/history.cc @@ -25,17 +25,19 @@ #include #include + using namespace sgpem; -using namespace std; History::History() : _front(0), _notify(true) -{} +{ +} History::~History() -{} +{ +} void diff --git a/src/backend/null_policy_exception.cc b/src/backend/null_policy_exception.cc index 9d9795c..b73d0b5 100644 --- a/src/backend/null_policy_exception.cc +++ b/src/backend/null_policy_exception.cc @@ -23,9 +23,11 @@ // catching it (with typeinfo). #include + using namespace sgpem; NullPolicyException::NullPolicyException(const char* msg) : std::runtime_error(msg) -{} +{ +} diff --git a/src/backend/plugin_manager.cc b/src/backend/plugin_manager.cc index 0279abf..b312fd8 100644 --- a/src/backend/plugin_manager.cc +++ b/src/backend/plugin_manager.cc @@ -34,7 +34,6 @@ #include using namespace sgpem; -using namespace std; template class SG_DLLEXPORT Singleton; diff --git a/src/backend/resource.cc b/src/backend/resource.cc index 2ef92ef..d6061d2 100644 --- a/src/backend/resource.cc +++ b/src/backend/resource.cc @@ -23,5 +23,6 @@ using namespace sgpem; Resource::~Resource() -{} +{ +} diff --git a/src/backend/resource_policy_priority.cc b/src/backend/resource_policy_priority.cc index 86bbe3d..d846ef1 100644 --- a/src/backend/resource_policy_priority.cc +++ b/src/backend/resource_policy_priority.cc @@ -22,11 +22,11 @@ #include -using namespace std; using namespace sgpem; ResourcePolicyPriority::~ResourcePolicyPriority() -{} +{ +} PolicyParameters& diff --git a/src/backend/schedulable_statistics.cc b/src/backend/schedulable_statistics.cc index d2e7bd4..135c094 100644 --- a/src/backend/schedulable_statistics.cc +++ b/src/backend/schedulable_statistics.cc @@ -18,13 +18,15 @@ // along with SGPEMv2; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -#include "sgpemv2/schedulable_statistics.hh" +#include using namespace sgpem; SchedulableStatistics::SchedulableStatistics() -{} +{ +} SchedulableStatistics::~SchedulableStatistics() -{} +{ +} diff --git a/src/backend/serializers_gatekeeper.cc b/src/backend/serializers_gatekeeper.cc index fd35c13..e58b23c 100644 --- a/src/backend/serializers_gatekeeper.cc +++ b/src/backend/serializers_gatekeeper.cc @@ -1,4 +1,4 @@ -// src/backend/policies_gatekeeper.cc - Copyright 2005, 2006, University +// src/backend/serializers_gatekeeper.cc - Copyright 2005, 2006, University // of Padova, dept. of Pure and Applied // Mathematics // @@ -73,5 +73,6 @@ SerializersGatekeeper::unregister_serializer(Serializer* serializer) SerializersGatekeeper::SerializersGatekeeper() -{} +{ +} diff --git a/src/backend/sgpemv2/process.hh b/src/backend/sgpemv2/process.hh index 851722c..ba6119f 100644 --- a/src/backend/sgpemv2/process.hh +++ b/src/backend/sgpemv2/process.hh @@ -43,7 +43,7 @@ namespace sgpem virtual void serialize(SerializeVisitor& translator) const = 0; }; -} +}//~namespace sgpem -#endif +#endif //~ PROCESS_HH diff --git a/src/backend/sgpemv2/resource_policy_fifo.hh b/src/backend/sgpemv2/resource_policy_fifo.hh index a3eca20..60eb34e 100644 --- a/src/backend/sgpemv2/resource_policy_fifo.hh +++ b/src/backend/sgpemv2/resource_policy_fifo.hh @@ -89,4 +89,4 @@ namespace sgpem }//~ namespace sgpem -#endif +#endif //~ RESOURCE_POLICY_FIFO_HH diff --git a/src/backend/sgpemv2/resource_policy_manager.hh b/src/backend/sgpemv2/resource_policy_manager.hh index a729fa5..568bb05 100644 --- a/src/backend/sgpemv2/resource_policy_manager.hh +++ b/src/backend/sgpemv2/resource_policy_manager.hh @@ -56,5 +56,5 @@ namespace sgpem } //~ namespace sgpem -#endif +#endif // ~ RESOURCE_POLICY_MANAGER_HH diff --git a/src/backend/sgpemv2/templates/smartp.hh b/src/backend/sgpemv2/templates/smartp.hh index 4eebc1a..9b78ceb 100644 --- a/src/backend/sgpemv2/templates/smartp.hh +++ b/src/backend/sgpemv2/templates/smartp.hh @@ -1,4 +1,8 @@ -// smartp.hh - Copyright 2005, Matteo Settenvini +// src/backend/sgpemv2/templates/smartp.hh - Copyright 2005, 2006, University +// of Padova, dept. of Pure and Applied +// Mathematics +// +// This file is part of SGPEMv2. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by diff --git a/src/backend/sgpemv2/thread.hh b/src/backend/sgpemv2/thread.hh index ef7475d..45f2913 100644 --- a/src/backend/sgpemv2/thread.hh +++ b/src/backend/sgpemv2/thread.hh @@ -43,7 +43,7 @@ namespace sgpem virtual void serialize(SerializeVisitor& translator) const = 0; }; -} +}//~ namespace sgpem -#endif +#endif//~ THREAD_HH