BWAPI
Public Types | Public Member Functions | Public Attributes
ResourceTimeline Class Reference

#include <ResourceTimeline.h>

Collaboration diagram for ResourceTimeline:
Collaboration graph
[legend]

List of all members.

Public Types

enum  ErrorCode { None, Insufficient_Minerals, Insufficient_Gas, Insufficient_Supply }

Public Member Functions

 ResourceTimeline ()
void reset (const Resources &r, int supplyTotal, double mgr, double ggr)
Resources getActualResourcesAtTime (int frame)
Resources getAvailableResourcesAtTime (int frame)
int getSupplyTotalAtTime (int frame)
int getFinalSupplyAvailable ()
int getFinalSupplyTotal ()
bool reserveResources (int frame, const Resources &r)
int getFirstValidTime (const Resources &r)
int getFirstTimeWhenSupplyIsNoGreaterThan (int supplyAmount)
ErrorCode getLastError () const
bool registerSupplyIncrease (int frame, int supply)
bool unregisterSupplyIncrease (int frame, int supply)

Public Attributes

ErrorCode lastError
double mineralGatherRate
double gasGatherRate
Resources currentResources
int currentSupplyTotal
std::map< int, ResourcesresourceEvents
std::map< int, int > supplyIncreaseEvents

Member Enumeration Documentation

Enumerator:
None 
Insufficient_Minerals 
Insufficient_Gas 
Insufficient_Supply 

Constructor & Destructor Documentation


Member Function Documentation

Here is the call graph for this function:

Here is the call graph for this function:

Here is the call graph for this function:

bool ResourceTimeline::registerSupplyIncrease ( int  frame,
int  supply 
)
bool ResourceTimeline::reserveResources ( int  frame,
const Resources r 
)

Here is the call graph for this function:

void ResourceTimeline::reset ( const Resources r,
int  supplyTotal,
double  mgr,
double  ggr 
)
bool ResourceTimeline::unregisterSupplyIncrease ( int  frame,
int  supply 
)

Member Data Documentation


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines