#include <grid.h>
|
| Grid (const std::string &name, const std::string &topic) |
| Constructor of Grid, takes a name and subject as arguments.
|
|
| ~Grid () |
| Destructor, free allocated GridManager.
|
|
GridManager * | GetGridManager () |
| Returns the underlying GridManager (allows modification)
|
|
const std::string & | GetName () const |
| Returns the name of the Grid.
|
|
void | ChangeName (const std::string &name) |
| Modifies the name of the Grid with a new name.
|
|
const std::string & | GetTopic () const |
| Returns the subject of the Grid.
|
|
void | ChangeTopic (const std::string &topic) |
| Modifies the subject of the Grid with a new subject.
|
|
uint | GetAvailableMachineCount () const |
| Returns the total amount of machines in the underlying GridManager.
|
|
double | HighestMachineRAM () const |
| Returns the RAM (in GB) of the machine with the highest amount of RAM. 0 if there are no machines.
|
|
double | TotalDiskSpace () const |
| Returns the total amount of disk space (in GB) available in the machines.
|
|
bool | Save (ByteBuffer &bb) const override |
| Saves the information of the instance of the class to the given ByteBuffer.
|
|
void | Update (uint32 diff) override |
| Updates the underlying GridManager.
|
|
void | Print (std::ostream &os=std::cout) const override |
| Prints current Grid information.
|
|
|
| Grid (const std::string &name, const std::string &topic, GridManager *gm) |
| Constructor of Grid, takes a name, subject and existing GridManager as arguments.
|
|
| Grid (const Grid &) |
| Copy constructor. Private to avoid copies of a Grid instance.
|
|
Grid & | operator= (Grid const &) |
| Assignment operator. Private to avoid copies of a Grid instance.
|
|
Grid::Grid |
( |
const std::string & |
name, |
|
|
const std::string & |
topic, |
|
|
GridManager * |
gm |
|
) |
| |
|
private |
Constructor of Grid, takes a name, subject and existing GridManager as arguments.
Grid::Grid |
( |
const std::string & |
name, |
|
|
const std::string & |
topic |
|
) |
| |
Constructor of Grid, takes a name and subject as arguments.
Grid::Grid |
( |
const Grid & |
| ) |
|
|
private |
Copy constructor. Private to avoid copies of a Grid instance.
void Grid::ChangeName |
( |
const std::string & |
name | ) |
|
Modifies the name of the Grid with a new name.
void Grid::ChangeTopic |
( |
const std::string & |
topic | ) |
|
Modifies the subject of the Grid with a new subject.
uint Grid::GetAvailableMachineCount |
( |
| ) |
const |
Returns the total amount of machines in the underlying GridManager.
Returns the underlying GridManager (allows modification)
const std::string& Grid::GetName |
( |
| ) |
const |
Returns the name of the Grid.
const std::string& Grid::GetTopic |
( |
| ) |
const |
Returns the subject of the Grid.
double Grid::HighestMachineRAM |
( |
| ) |
const |
Returns the RAM (in GB) of the machine with the highest amount of RAM. 0 if there are no machines.
Returns a pointer to a Grid loaded from the given ByteBuffer.
- Parameters
-
- Returns
- A pointer to the loaded Grid.
Assignment operator. Private to avoid copies of a Grid instance.
void Grid::Print |
( |
std::ostream & |
os = std::cout | ) |
const |
|
overridevirtual |
Prints current Grid information.
Implements IPrint.
void Grid::PrintHeader |
( |
std::ostream & |
os = std::cout | ) |
|
|
static |
Prints table header for Grids.
Saves the information of the instance of the class to the given ByteBuffer.
- Parameters
-
bb | destination of the data. |
- Returns
- A boolean value that indicates whether the save was successful or not.
Implements ISave.
double Grid::TotalDiskSpace |
( |
| ) |
const |
Returns the total amount of disk space (in GB) available in the machines.
void Grid::Update |
( |
uint32 |
diff | ) |
|
|
overridevirtual |
uint Grid::_maxNameLength = 4 |
|
staticprivate |
The length of the biggest name, used in Print methods.
uint Grid::_maxTopicLength = 5 |
|
staticprivate |
The length of the biggest topic, used in Print methods.
The documentation for this class was generated from the following files: