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

User abstract Class. More...

#include <user.h>

Inheritance diagram for User:
ISave IPrint AcademicUser EnterpriseUser

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 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

 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.
 

Detailed Description

User abstract Class.

User represents a person or a collective of persons that can interact with GridManager by creating Jobs

Constructor & Destructor Documentation

virtual User::~User ( )
virtual
User::User ( uint  id)
protected
User::User ( const std::string &  name)
protected

Constructor used by subclasses.

Member Function Documentation

virtual bool User::CanCreateJob ( const Job job)
pure virtual

Returns true if User can create the given Job.

Implemented in EnterpriseUser, and AcademicUser.

virtual void User::CreatedJob ( const Job job)
pure virtual

Updates User info when a Job creation was successfull.

Implemented in EnterpriseUser, and AcademicUser.

uint User::GetId ( ) const

Virtual destructor.

Returns the User's identifier

static Menu* User::GetMenu ( )
static

Returns the menu for the User class.

const std::string& User::GetName ( ) const

Returns the User's name.

User * User::Load ( ByteBuffer bb)
static

Loads (1) User data from a ByteBuffer.

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

Representation of the class in a row form.

Parameters
osstream to print to.

Implements IPrint.

Reimplemented in EnterpriseUser, and AcademicUser.

void User::PrintHeader ( std::ostream &  os = std::cout)
static
bool User::Save ( ByteBuffer bb) const
overridevirtual

Savers User data to a ByteBuffer.

Implements ISave.

Reimplemented in EnterpriseUser, and AcademicUser.

void User::SetId ( uint  val)

Changes the User's identifier.

void User::SetName ( const std::string &  name)

Updates the User's name.

Member Data Documentation

uint User::_id
private

User's identifier.

uint User::_maxNameLength = 0
staticprotected

The length of the biggest name, used in Print methods.

Menu * User::_menu = Loader<Menu>("userMenu.txt").Load()
staticprotected

Menu associated with the User class.

std::string User::_name
private

User's name.


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