Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CResourceManager Class Reference

CResourceManager. More...

#include <ResourceManager.h>

List of all members.

Public Member Functions

 CResourceManager ()
 CResourceManager.
 ~CResourceManager ()
 ~CResourceManager
void CollectResources (vector< CResource * > resources)
 CollectResources.
void CollectResources (CResource *resource)
 CollectResources.
void GetResourceList (vector< CResource * > &resources)
 GetResourceList.
vector< CMatch * > SetupRound (const CRound *round)
 SetupRound.
bool SetupMatch (CMatch *match, vector< CResource * > AvailResources)
 SetupMatch.

Protected Member Functions

void SortResources ()
 SortResources.


Detailed Description

CResourceManager.

Description: The ResourceManager class manages the assigment of players to client machines.

Limitations: None


Constructor & Destructor Documentation

CResourceManager::CResourceManager  ) 
 

CResourceManager.

Description: The constructor initializes internal class attributes.

Returns:
None
Limitations: None

CResourceManager::~CResourceManager  ) 
 

~CResourceManager

Description: Destructor included for maintenace purposes only.

Returns:
None
Limitations: None


Member Function Documentation

void CResourceManager::CollectResources CResource resource  ) 
 

CollectResources.

Description: Adds a single resource to the list of resources that will be used during game configuration.

Parameters:
resource,: the resource to add.
Returns:
void
Limitations: None

void CResourceManager::CollectResources vector< CResource * >  resources  ) 
 

CollectResources.

Description: Adds a vector of resources to the list of resourcese that will be used during game configuation.

Parameters:
resources,: the list of resources that will be added.
Returns:
void
Limitations: None

void CResourceManager::GetResourceList vector< CResource * > &  resources  ) 
 

GetResourceList.

Description: This function returns the list of resources that will be used during game configuration.

Parameters:
resources,: [out] The list that will be filled.
Returns:
void
Limitations: None

bool CResourceManager::SetupMatch CMatch match,
vector< CResource * >  AvailRes
 

SetupMatch.

Description: This function setups clients for a match. The function will try to load the players faily according to the following rules: 1) Human and AIs will each receive their own machine whenever possible. 2) If all machines has an assigment, Humans and AIs will share a machine. 3) As a last resort, two AIs will be assigned the same machine.

Parameters:
match,: The match that defines the participants to be assigned machines.
Returns:
bool: true if the match was setup.
Limitations: None

vector< CMatch * > CResourceManager::SetupRound const CRound round  ) 
 

SetupRound.

Description: Given a tournament round, this function assigns players to resources in the most fair manner possible. See SetupMatch for specifics.

Parameters:
round,: The round to be setup.
Returns:
A vector of matches that could not be setup
Limitations: None

void CResourceManager::SortResources  )  [protected]
 

SortResources.

Description: Sorts the resource list according. The sort is arranged with the resources with the highest benchmark value first.

Returns:
void
Limitations: None


The documentation for this class was generated from the following files:
Copyright (c) 2005 Matt Bruns, Pat Hammond, Kevin Markussen, Travis Service, Brain Shaver

SourceForge.net Logo