- Audited some files
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1148 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
c78794e27d
commit
90c562006a
7 changed files with 106 additions and 43 deletions
|
@ -1,4 +1,4 @@
|
|||
// src/backend/serialize_visitor.cc - Copyright 2005, 2006, University
|
||||
// src/backend/serializer.cc - Copyright 2005, 2006, University
|
||||
// of Padova, dept. of Pure and Applied
|
||||
// Mathematics
|
||||
//
|
||||
|
@ -26,9 +26,12 @@ using namespace sgpem;
|
|||
|
||||
Serializer::Serializer()
|
||||
{
|
||||
// automatically register subclasses to the manager
|
||||
SerializersGatekeeper::get_instance().register_serializer(this);
|
||||
}
|
||||
|
||||
Serializer::~Serializer()
|
||||
{}
|
||||
{
|
||||
// INSPECTOR NOTE: no unregister here?
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,11 @@
|
|||
#ifndef CPU_POLICY_MANAGER_HH
|
||||
#define CPU_POLICY_MANAGER_HH 1
|
||||
|
||||
namespace sgpem
|
||||
{
|
||||
class CPUPolicyManager;
|
||||
}
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <sgpemv2/cpu_policy.hh>
|
||||
|
@ -30,24 +35,21 @@
|
|||
|
||||
namespace sgpem
|
||||
{
|
||||
class CPUPolicyManager;
|
||||
|
||||
/**
|
||||
CPUPolicyManager is the Abstract Factory for \ref CPUPolicy objects.
|
||||
\brief CPUPolicyManager is the Abstract Factory for
|
||||
\ref CPUPolicy objects.
|
||||
*/
|
||||
class SG_DLLEXPORT CPUPolicyManager
|
||||
{
|
||||
public:
|
||||
typedef CPUPolicy Policy;
|
||||
typedef std::vector<Policy*> Policies;
|
||||
|
||||
/** \brief CPUPolicyManager constructor
|
||||
*
|
||||
* Saves ``this'' pointer into the _registered attribute, so it can access
|
||||
* it when requested. This is done so that concrete subclasses can be defined
|
||||
* Registers the \b this pointer to the CPUPoliciesGatekeeper, so it can be accessed
|
||||
* when needed. This is done so that concrete subclasses can be defined
|
||||
* even if they are found in external dynamic modules not known at compile time.
|
||||
*
|
||||
* For the moment, just an instance of CPUPolicyManager can be saved. This will
|
||||
* be expanded in next milestones.
|
||||
*/
|
||||
CPUPolicyManager();
|
||||
|
||||
|
@ -56,6 +58,16 @@ namespace sgpem
|
|||
virtual const Policies& get_avail_policies() = 0;
|
||||
|
||||
protected:
|
||||
/**
|
||||
* \brief Collects available policies
|
||||
*
|
||||
* Overriders should implement this method such that it
|
||||
* collects available policies (an operation which may need to be done
|
||||
* at run-time in case user-defined policies are to be supported)
|
||||
* and puts them inside _policies. The application then assumes this
|
||||
* method will be called at some time during the initialization of
|
||||
* the manager (usually inside the constructor).
|
||||
*/
|
||||
virtual void collect_policies() = 0;
|
||||
|
||||
std::vector<CPUPolicy*> _policies;
|
||||
|
|
|
@ -21,16 +21,19 @@
|
|||
#ifndef REQUEST_HH
|
||||
#define REQUEST_HH 1
|
||||
|
||||
#include "config.h"
|
||||
#include <vector>
|
||||
|
||||
namespace sgpem
|
||||
{
|
||||
class Request;
|
||||
class SerializeVisitor;
|
||||
class SubRequest;
|
||||
class Thread;
|
||||
}
|
||||
|
||||
#include "config.h"
|
||||
#include <vector>
|
||||
|
||||
namespace sgpem
|
||||
{
|
||||
class SG_DLLEXPORT Request
|
||||
{
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue