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

EnterpriseUser Class. More...

#include <user.h>

Inheritance diagram for EnterpriseUser:
User ISave IPrint

Public Member Functions

 EnterpriseUser (const std::string &name, double budget)
 
double GetBudget () const
 Returns the current budget, in euros.
 
void SetBudget (double val)
 Changes the budget.
 
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

double _budget
 Current budget.
 

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

EnterpriseUser Class.

EnterpriseUser represents a company that pays for each job created (with a budget)

Constructor & Destructor Documentation

EnterpriseUser::EnterpriseUser ( const std::string &  name,
double  budget 
)

Member Function Documentation

bool EnterpriseUser::CanCreateJob ( const Job job)
overridevirtual

Returns true if User can create the given Job.

Implements User.

void EnterpriseUser::CreatedJob ( const Job job)
overridevirtual

Updates User info when a Job creation was successfull.

Implements User.

double EnterpriseUser::GetBudget ( ) const

Returns the current budget, in euros.

void EnterpriseUser::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 EnterpriseUser::Save ( ByteBuffer bb) const
overridevirtual

Savers User data to a ByteBuffer.

Reimplemented from User.

void EnterpriseUser::SetBudget ( double  val)

Changes the budget.

Member Data Documentation

double EnterpriseUser::_budget
private

Current budget.


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