GridComputing
Job Management in Grid Computing
Main Page
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
grid.h
Go to the documentation of this file.
1
#ifndef GRID_H_
2
#define GRID_H_
3
4
#include <string>
5
6
#include "
utils.h
"
7
#include "
interfaces.h
"
8
9
class
GridManager
;
10
11
class
Grid
:
public
ISave
,
public
IUpdate
,
public
IPrint
12
{
13
private
:
14
GridManager
*
_gm
;
15
std::string
_name
;
16
std::string
_topic
;
17
19
Grid
(
const
std::string& name,
const
std::string& topic,
GridManager
* gm);
20
21
static
uint
_maxNameLength
;
22
static
uint
_maxTopicLength
;
23
24
public
:
26
Grid
(
const
std::string& name,
const
std::string& topic);
27
29
~Grid
();
30
32
GridManager
*
GetGridManager
() {
return
_gm
; }
// not const
33
35
const
std::string&
GetName
()
const
{
return
_name
; }
37
void
ChangeName
(
const
std::string& name) {
_name
= name; }
38
40
const
std::string&
GetTopic
()
const
{
return
_topic
; }
42
void
ChangeTopic
(
const
std::string& topic) {
_topic
= topic; }
43
45
uint
GetAvailableMachineCount
()
const
;
46
48
double
HighestMachineRAM
()
const
;
49
51
double
TotalDiskSpace
()
const
;
52
58
static
Grid
*
Load
(
ByteBuffer
& bb);
59
65
bool
Save
(
ByteBuffer
& bb)
const override
;
66
68
void
Update
(
uint32
diff)
override
;
69
70
void
Print
(std::ostream& os = std::cout)
const override
;
71
static
void
PrintHeader
(std::ostream& os = std::cout);
72
73
private
:
// no copying
75
Grid
(
const
Grid
&);
77
Grid
&
operator =
(
Grid
const
&);
78
};
79
80
#endif // GRID_H_
src
grid.h
Generated on Sun Dec 30 2012 14:13:36 for GridComputing by
1.8.2