GridComputing
Job Management in Grid Computing
|
AcademicUser Class. More...
#include <user.h>
Public Member Functions | |
AcademicUser (uint id) | |
AcademicUser (const std::string &name) | |
AcademicUser (const std::string &name, uint jobCount) | |
uint | GetJobCount () const |
Returns the number of executed jobs. | |
bool | Save (ByteBuffer &bb) const override |
Savers User data to a ByteBuffer. | |
void | CreatedJob (const Job *job) override |
Updates User info when a Job creation was successfull. | |
bool | CanCreateJob (const Job *job) override |
Returns true if User can create the given Job. | |
void | Print (std::ostream &os=std::cout) const override |
Representation of the class in a row form. | |
Public Member Functions inherited from User | |
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. | |
Private Attributes | |
uint | _jobCount |
Number of executed jobs. | |
Additional Inherited Members | |
Static Public Member Functions inherited from User | |
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 inherited from User | |
User (uint id) | |
User (const std::string &name) | |
Constructor used by subclasses. | |
Static Protected Attributes inherited from User | |
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. | |
AcademicUser Class.
AcademicUser represents a student with no limit on the number of created jobs
AcademicUser::AcademicUser | ( | uint | id | ) |
AcademicUser::AcademicUser | ( | const std::string & | name | ) |
AcademicUser::AcademicUser | ( | const std::string & | name, |
uint | jobCount | ||
) |
|
overridevirtual |
|
overridevirtual |
uint AcademicUser::GetJobCount | ( | ) | const |
Returns the number of executed jobs.
|
overridevirtual |
Representation of the class in a row form.
os | stream to print to. |
Reimplemented from User.
|
overridevirtual |
Savers User data to a ByteBuffer.
Reimplemented from User.
|
private |
Number of executed jobs.