GridComputing
Job Management in Grid Computing
|
#include <user.h>
Public Member Functions | |
virtual | ~User () |
uint | GetId () const |
Virtual destructor. | |
void | SetId (uint val) |
Changes the User's identifier. | |
void | SetName (const std::string &name) |
Updates the User's name. | |
const std::string & | GetName () const |
Returns the User's name. | |
virtual bool | Save (ByteBuffer &bb) const override |
Savers User data to a ByteBuffer. | |
virtual bool | CanCreateJob (const Job *job)=0 |
Returns true if User can create the given Job. | |
virtual void | CreatedJob (const Job *job)=0 |
Updates User info when a Job creation was successfull. | |
virtual void | Print (std::ostream &os=std::cout) const override |
Representation of the class in a row form. | |
Static Public Member Functions | |
static User * | Load (ByteBuffer &bb) |
Loads (1) User data from a ByteBuffer. | |
static void | PrintHeader (std::ostream &os=std::cout) |
static Menu * | GetMenu () |
Returns the menu for the User class. | |
Protected Member Functions | |
User (uint id) | |
User (const std::string &name) | |
Constructor used by subclasses. | |
Static Protected Attributes | |
static Menu * | _menu = Loader<Menu>("userMenu.txt").Load() |
Menu associated with the User class. | |
static uint | _maxNameLength = 0 |
The length of the biggest name, used in Print methods. | |
Private Attributes | |
std::string | _name |
User's name. | |
uint | _id |
User's identifier. | |
User abstract Class.
User represents a person or a collective of persons that can interact with GridManager by creating Jobs
|
virtual |
|
protected |
|
protected |
Constructor used by subclasses.
|
pure virtual |
Returns true if User can create the given Job.
Implemented in EnterpriseUser, and AcademicUser.
|
pure virtual |
Updates User info when a Job creation was successfull.
Implemented in EnterpriseUser, and AcademicUser.
const std::string& User::GetName | ( | ) | const |
Returns the User's name.
|
static |
Loads (1) User data from a ByteBuffer.
|
overridevirtual |
Representation of the class in a row form.
os | stream to print to. |
Implements IPrint.
Reimplemented in EnterpriseUser, and AcademicUser.
|
static |
|
overridevirtual |
Savers User data to a ByteBuffer.
Implements ISave.
Reimplemented in EnterpriseUser, and AcademicUser.
void User::SetName | ( | const std::string & | name | ) |
Updates the User's name.
|
staticprotected |
The length of the biggest name, used in Print methods.
|
private |
User's name.