ARC SDK
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
svn-area
arc1-clean
src
hed
libs
compute
BrokerPlugin.h
Go to the documentation of this file.
1
// -*- indent-tabs-mode: nil -*-
2
3
#ifndef __ARC_BROKERPLUGIN_H__
4
#define __ARC_BROKERPLUGIN_H__
5
10
#include <arc/loader/Loader.h>
11
#include <arc/loader/Plugin.h>
12
13
namespace
Arc {
14
class
ExecutionTarget;
15
class
JobDescription;
16
class
Logger;
17
class
URL;
18
class
UserConfig;
19
21
25
class
BrokerPluginArgument
:
public
PluginArgument {
26
public
:
27
BrokerPluginArgument
(
const
UserConfig
& uc) : uc(uc) {}
28
~
BrokerPluginArgument
() {}
29
operator
const
UserConfig
&()
const
{
return
uc; }
30
private
:
31
const
UserConfig
& uc;
32
};
33
35
46
class
BrokerPlugin
:
public
Plugin {
47
public
:
49
BrokerPlugin
(
BrokerPluginArgument
* arg) : Plugin(arg), uc(*arg), j(NULL) {}
51
virtual
bool
operator()
(
const
ExecutionTarget
& lhs,
const
ExecutionTarget
& rhs)
const
;
53
virtual
bool
match
(
const
ExecutionTarget
& et)
const
;
55
virtual
void
set
(
const
JobDescription
& _j)
const
;
56
protected
:
57
const
UserConfig
& uc;
58
mutable
const
JobDescription
* j;
59
60
static
Logger
logger;
61
};
62
64
68
class
BrokerPluginLoader
:
public
Loader {
69
public
:
71
BrokerPluginLoader
();
73
~BrokerPluginLoader
();
75
BrokerPlugin
*
load
(
const
UserConfig
& uc,
const
std::string& name =
""
,
bool
keep_ownerskip =
true
);
77
BrokerPlugin
*
load
(
const
UserConfig
& uc,
const
JobDescription
& j,
const
std::string& name =
""
,
bool
keep_ownerskip =
true
);
79
BrokerPlugin
*
copy
(
const
BrokerPlugin
* p,
bool
keep_ownerskip =
true
);
80
81
private
:
82
BrokerPlugin
*
load
(
const
UserConfig
& uc,
const
JobDescription
* j,
const
std::string& name,
bool
keep_ownerskip);
83
84
std::list<BrokerPlugin*> plugins;
85
};
86
87
}
// namespace Arc
88
89
#endif // __ARC_BROKERPLUGIN_H__
Generated on Fri Jul 5 2013 14:37:45 for ARC SDK by
1.8.3.1-20130209