GridComputing
Job Management in Grid Computing
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
AcademicUser Class Reference

AcademicUser Class. More...

#include <user.h>

Inheritance diagram for AcademicUser:
User ISave IPrint

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 UserLoad (ByteBuffer &bb)
 Loads (1) User data from a ByteBuffer.
 
static void PrintHeader (std::ostream &os=std::cout)
 
static MenuGetMenu ()
 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.
 

Detailed Description

AcademicUser Class.

AcademicUser represents a student with no limit on the number of created jobs

Constructor & Destructor Documentation

AcademicUser::AcademicUser ( uint  id)
AcademicUser::AcademicUser ( const std::string &  name)
AcademicUser::AcademicUser ( const std::string &  name,
uint  jobCount 
)

Member Function Documentation

bool AcademicUser::CanCreateJob ( const Job job)
overridevirtual

Returns true if User can create the given Job.

Implements User.

void AcademicUser::CreatedJob ( const Job job)
overridevirtual

Updates User info when a Job creation was successfull.

Implements User.

uint AcademicUser::GetJobCount ( ) const

Returns the number of executed jobs.

void AcademicUser::Print ( std::ostream &  os = std::cout) const
overridevirtual

Representation of the class in a row form.

Parameters
osstream to print to.

Reimplemented from User.

bool AcademicUser::Save ( ByteBuffer bb) const
overridevirtual

Savers User data to a ByteBuffer.

Reimplemented from User.

Member Data Documentation

uint AcademicUser::_jobCount
private

Number of executed jobs.


The documentation for this class was generated from the following files: