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

IdleUser Class. More...

#include <idleuser.h>

Inheritance diagram for IdleUser:
IUpdate ISave IPrint

Public Member Functions

 IdleUser (const std::string &name, uint id, UserType type)
 Constructor.
 
const std::string & GetName () const
 Returns the User name.
 
uint GetId () const
 Returns the original user id.
 
UserType GetUserType () const
 Returns the user type (academic or enterprise)
 
uint32 GetElapsedTime () const
 
virtual bool Save (ByteBuffer &bb) const
 

Returns the time in seconds since the user was removed


 
virtual void Update (uint32 diff)
 Updates elapsed time.
 
virtual void Print (std::ostream &os=std::cout) const
 Prints current IdleUser information.
 

Static Public Member Functions

static IdleUserFromUser (const User *user)
 Converts User into IdleUser.
 
static IdleUserLoad (ByteBuffer &bb)
 Loads (1) IdleUser data from a ByteBuffer.
 
static void PrintHeader (std::ostream &os=std::cout)
 Prints table header for IdleUsers.
 

Private Attributes

std::string _name
 User name.
 
uint _id
 Original User id.
 
UserType _type
 User type (academic or enterprise)
 
uint32 _elapsedTime
 Time in seconds since the user was removed.
 

Static Private Attributes

static uint _maxNameLength = 0
 The length of the biggest name, used in Print methods.
 

Detailed Description

IdleUser Class.

IdleUser represents an user that was removed from a Grid

Constructor & Destructor Documentation

IdleUser::IdleUser ( const std::string &  name,
uint  id,
UserType  type 
)

Constructor.

Member Function Documentation

IdleUser * IdleUser::FromUser ( const User user)
static

Converts User into IdleUser.

uint32 IdleUser::GetElapsedTime ( ) const
uint IdleUser::GetId ( ) const

Returns the original user id.

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

Returns the User name.

UserType IdleUser::GetUserType ( ) const

Returns the user type (academic or enterprise)

IdleUser * IdleUser::Load ( ByteBuffer bb)
static

Loads (1) IdleUser data from a ByteBuffer.

void IdleUser::Print ( std::ostream &  os = std::cout) const
virtual

Prints current IdleUser information.

Implements IPrint.

void IdleUser::PrintHeader ( std::ostream &  os = std::cout)
static

Prints table header for IdleUsers.

bool IdleUser::Save ( ByteBuffer bb) const
virtual

Returns the time in seconds since the user was removed

Saves IdleUser data to a ByteBuffer

Implements ISave.

void IdleUser::Update ( uint32  diff)
virtual

Updates elapsed time.

Implements IUpdate.

Member Data Documentation

uint32 IdleUser::_elapsedTime
private

Time in seconds since the user was removed.

uint IdleUser::_id
private

Original User id.

uint IdleUser::_maxNameLength = 0
staticprivate

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

std::string IdleUser::_name
private

User name.

UserType IdleUser::_type
private

User type (academic or enterprise)


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